Last active
March 19, 2019 13:51
-
-
Save kentavv/a3915b40bd8759d6c1465679010e8a2d to your computer and use it in GitHub Desktop.
Invoking python debugger on exception
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pdb | |
try: | |
1/0 | |
except Exception: | |
# Just say "no" to endless debug-prints | |
pdb.post_mortem() | |
#<stdin>(2)<module>() | |
#(Pdb) h | |
# | |
#Documented commands (type help <topic>): | |
#======================================== | |
#EOF c d h list q rv undisplay | |
#a cl debug help ll quit s unt | |
#alias clear disable ignore longlist r source until | |
#args commands display interact n restart step up | |
#b condition down j next return tbreak w | |
#break cont enable jump p retval u whatis | |
#bt continue exit l pp run unalias where | |
# | |
#Miscellaneous help topics: | |
#========================== | |
#exec pdb | |
# | |
#(Pdb) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment