Created
August 7, 2016 07:15
-
-
Save nvictus/96d123bd5ddb053303889739443b0000 to your computer and use it in GitHub Desktop.
Post mortem exception hook with ipdb
This file contains hidden or 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
def set_postmortem_hook(): | |
import sys, traceback, ipdb | |
def _excepthook(exc_type, value, tb): | |
traceback.print_exception(exc_type, value, tb) | |
print() | |
ipdb.pm() | |
sys.excepthook = _excepthook |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment