setting breakpoints with nosetests –pdb option

Even better than remembering to use -s is to use the set_trace variant that comes with Nose. Add

from nose.tools import set_trace; set_trace()

wherever you’d like to break in to the debugger. The stdin/out redirection will be taken care of for you. The only strange side effect I’ve run into is the inability to restart your code from within pdb (using run) while debugging during a nose run.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)