Cannot step debugger in IPython 0.9.1/0.10 under Python 2.6.2/2.6.4: Pdb instance has no attribute 'curframe'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
IPython |
Fix Committed
|
High
|
Fernando Perez | ||
ipython (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I cannot step into scripts with "run -d"; ipython halts before the
first line with "Pdb instance has no attribute 'curframe'". It fails
even when debugging very simple files and with no user-specific
customizations loaded, no .bash_profile and no PYTHONPATH, in a
pristine directory so none of my files should override any defaults.
"run" without -d option works, as does pdb.set_trace()1. Plain Python also works as usual.
I'm not sure when this problem arose, but it may have been after an
upgrade from the versions included with Ubuntu 8.04 (Python 2.5.2 and
IPython 0.8.1? wild guess).
Minimal example:
===============
$ cat > debug_me.py
x = 2 + 2
y = 3 + 3
$ ipython
/var/lib/
DeprecationWarning: the sets module is deprecated
from sets import Set
Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18)
Type "copyright", "credits" or "license" for more information.
IPython 0.9.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: run -d debug_me.py
-------
AttributeError Traceback (most recent call last)
.../<ipython console> in <module>()
/var/lib/
951 else:
952 magic_args = self.var_
--> 953 return fn(magic_args)
954
955 def ipalias(
/var/lib/
parameter_s, runner)
1613 maxtries = 10
1614 bp = int(opts.
-> 1615 checkline = deb.checkline(
1616 if not checkline:
1617 for bp in range(bp+
/usr/lib/
450 line or EOF). Warning: testing is not comprehensive.
451 """
--> 452 line = linecache.
self.curframe.
453 if not line:
454 print >>self.stdout, 'End of file'
AttributeError: Pdb instance has no attribute 'curframe'
===============
Related branches
Changed in ipython (Ubuntu): | |
status: | Confirmed → Fix Released |
This error was also confirmed on a clean install of Ubuntu 9.04, IPython 0.10.bzr.r1163, and Python 2.6.2.