debugging with ipython does not work well outside ipython
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
IPython |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Python 2.5.4, IPython 0.9.1, gentoo linux
The Tracer does not work outside ipython, short summary follows below, for details see the thread [1].
[1] http://
When running the attachment file ipython_debug1.py:
$ python ipython_debug1.py
Traceback (most recent call last):
File "ipython_
debug = Tracer()
File "/usr/lib64/
135, in __init__
self.debugger = Pdb(colors)
File "/usr/lib64/
213, in __init__
self.
File "/usr/lib64/
151, in copy
return ColorSchemeTabl
File "/usr/lib64/
144, in __init__
raise ValueError,'you must specify the default color scheme'
ValueError: you must specify the default color scheme
The second file ipython_debug2.py performs better - the debugging is actually possible, but any exception after the 'continue' command causes the ipython crash dump:
$ python ipython_debug2.py
hello
> ipython_
13
---> 14 print 'hello again'
15
ipdb>
then type 'c' to continue, and you get the error. I would like to see
just the ZeroDivisionError, not the ipython crash dump that follows.
I'm afraid that for now, IPython's debugger is pretty much welded to living inside a 'real ipython'. It simply assumes in too many places that the ipython machinery is already up and running.
It would be definitely great to decouple them, but it's a fairly non-trivial job. I'm marking this as a wishlist item so we don't forget about it, but I don't think it will happen soon, unfortunately.