Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

restore auto debug behavior #344

Closed
wants to merge 1 commit into from

3 participants

@minrk
Owner

This restores the auto debug behavior of the '%pdb' magic.

I'm not 100% sure this is the right way to do it, since the previous code looked weird, and I want to be sure I'm not doing something wrong.

It definitely works for me, though.

This will close #296

@takluyver
Owner

Works for me.

@fperez
Owner

Thanks, Min! I edited the commit so it would auto close the bug and rebased to avoid the merge "handle" since it was a single commit. Pushed.

There may be a cleaner fix for this later on, I suspect we should spend some time disentangling that code better (the old stuff had very tightly coupled debugger/traceback/interactive calls). But for now this closes an important regression, so let's go with this fix. Thanks!

@fperez fperez closed this
@damianavila damianavila referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 8, 2011
  1. @minrk

    restore auto debug behavior

    minrk authored
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 6 deletions.
  1. +4 −6 IPython/core/interactiveshell.py
View
10 IPython/core/interactiveshell.py
@@ -1442,7 +1442,6 @@ def showtraceback(self,exc_tuple = None,filename=None,tb_offset=None,
sys.last_type = etype
sys.last_value = value
sys.last_traceback = tb
-
if etype in self.custom_exceptions:
# FIXME: Old custom traceback objects may just return a
# string, in that case we just put it into a list
@@ -1458,11 +1457,10 @@ def showtraceback(self,exc_tuple = None,filename=None,tb_offset=None,
else:
stb = self.InteractiveTB.structured_traceback(etype,
value, tb, tb_offset=tb_offset)
- # FIXME: the pdb calling should be done by us, not by
- # the code computing the traceback.
- if self.InteractiveTB.call_pdb:
- # pdb mucks up readline, fix it back
- self.set_readline_completer()
+
+ if self.call_pdb:
+ # drop into debugger
+ self.debugger(force=True)
# Actually show the traceback
self._showtraceback(etype, value, stb)
Something went wrong with that request. Please try again.