Comment 3 for bug 381069

Revision history for this message
Jon Olav Vik (jonovik) wrote : Re: Cannot step debugger in IPython 0.9.1 under Python 2.6.2: Pdb instance has no attribute 'curframe'

Minjae, thanks for the solution. For other newbies: I downloaded the package from http://sourceforge.net/projects/freshmeat_pydb/, e.g.

[jonvi@stallo-1 ~]$ wget http://sunet.dl.sourceforge.net/sourceforge/bashdb/pydb-1.26.tar.gz
[jonvi@stallo-1 ~]$ tar xvzf pydb-1.26.tar.gz

Since I'm just a regular user, I installed with
[jonvi@stallo-1 ~]$ cd pydb-1.26
[jonvi@stallo-1 pydb-1.26]$ ./configure --prefix=$HOME/usr/ && make && make install

Verifying installation (assuming ~/usr/bin is in $PATH):
[jonvi@stallo-1 ~]$ pydb
(Pydb) print 1+1
2
(Pydb) exit
Use exit() or Ctrl-D (i.e. EOF) to exit
<Ctrl-D>

(interestingly, exiting with exit() causes an error 8-)

My original example now works fine:

[jonvi@stallo-1 ~]$ cat > debug_me.py
x = 2 + 2
y = 3 + 3
<Ctrl-D>
[jonvi@stallo-1 ~]$ ipython -pydb
/global/apps/python/2.6.2/lib/python2.6/site-packages/ipython-0.9.1-py2.6.egg/IPython/Magic.py:38: DeprecationWarning: the sets module is deprecated
  from sets import Set
Python 2.6.2 (r262:71600, Apr 27 2009, 23:59:28)
IPython 0.9.1 -- An enhanced Interactive Python.
In [2]: run -d debug_me.py
No stack.
NOTE: Enter 'c' at the ipydb> prompt to start your script.
(<string>:1): <module>
ipydb> s
----------------Call level 7 > /home/jonvi/debug_me.py(1)<module>()
      0 y = 3 + 3
(/home/jonvi/debug_me.py:1): <module>
1 x = 2 + 2
ipydb> n
(/home/jonvi/debug_me.py:1): <module>
1 x = 2 + 2
ipydb>
(/home/jonvi/debug_me.py:2): <module>
2 y = 3 + 3
ipydb>
----------------Return from level 7 (<type 'NoneType'>)
--------------Return from level 6 (<type 'NoneType'>)