Just in time debugging idioms
Syver Enstad
syver at NOSPAMcyberwatcher.com
Fri Mar 30 16:43:44 EST 2001
I am used to VC++ on Windows giving you the option to debug a program if it
raises an assert. The closest I've come so far is like this:
try:
........
except AssertionError:
import pywin.debugger
pywin.debugger.post_mortem(sys.exc_info()[2])
Is putting the above at the top of the call stack the python way to invoke
the debugger on asserts, and other uncaught exceptions if you just place an
open except statement there instead.
Are there other debugging tecniques, idioms that people know of I'd be
interested to hear. Especially the possibility to recompile and reload
modules while stepping in the debugger would be nice. After all if you can
do it in C++ (in a way that is) it should be possible anywhere else.
More information about the Python-list
mailing list