Created
July 9, 2010 02:34
-
-
Save dwf/468955 to your computer and use it in GitHub Desktop.
Quick hack to get pudb to respond to the %debug magic in IPython 0.10.
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
--- iplib.bak 2010-07-08 22:30:10.000000000 -0400 | |
+++ iplib.py 2010-07-08 22:31:09.000000000 -0400 | |
@@ -1684,6 +1684,14 @@ | |
if Debugger.has_pydb: | |
from pydb import pm | |
else: | |
+ try: | |
+ import pudb | |
+ pudb.post_mortem((sys.last_type, | |
+ sys.last_value, | |
+ sys.last_traceback)) | |
+ return | |
+ except ImportError: | |
+ pass | |
# fallback to our internal debugger | |
pm = lambda : self.InteractiveTB.debugger(force=True) | |
self.history_saving_wrapper(pm)() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment