[IPython-dev] Patch for broken debugger

Erik Tollerud erik.tollerud@gmail....
Wed Dec 16 20:51:59 CST 2009


I decided to try out the bzr version of ipython again and it looks
great except for continued problems using the %debug magic ... this
time, instead of getting nothing, I get an exception due to the debug
handler trying to make use of the __IPYTHON__ builtin which I
understand has been removed in .11 ... This seemed like an easy fix,
so I went in and replaced __IPYTHON__ with a reference to the current
shell instance (assigned in the Pdb.__init__ from ipapi.get() ).
Problem is, apparently the debugger expects the shell to be an
InteractiveShellEmbed, which has a set_completer_frame method.  So I
added a method to the Pdb class that emulates the presence of
set_completer_frame, and now all of a sudden the debugger works
perfect. But I have no idea what unintended consequences this might
have (and am confused why set_completer_frame is not present in the
first place, or in InteractiveShell)...

At any rate, attached is a patch that seems to work for me (made with
bzr send).  In general, what's the best way to submit patches/fixes -
via this list, the launchpad bug tracker, or a personal launchpad
branch?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debugger.diff
Type: text/x-patch
Size: 7551 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/ipython-dev/attachments/20091216/c99d9540/attachment.bin 


More information about the IPython-dev mailing list