Created
May 6, 2011 18:07
-
-
Save acdha/959461 to your computer and use it in GitHub Desktop.
Run ipdb/pdb on the last 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 sys | |
tb = sys.exc_info()[2] | |
try: | |
import ipdb as pdb | |
except ImportError: | |
import pdb | |
sys.last_traceback = tb | |
pdb.pm() | |
raise |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment