Why doesnt PDB allow me to view the current line?

H

hardcoreUFO

I have some code that I am trying to debug (Python 2.5.2 on OSX) using
pdb. However, when the code reaches the pdb.set_trace(), it does not
allow me to view the current line:
/Users/chris/Research/ISEC/build/bdist.macosx-10.3-i386/egg/pyrl/reinforcement.py(943)__call__() (Pdb) n
/Users/chris/Research/ISEC/build/bdist.macosx-10.3-i386/egg/pyrl/reinforcement.py(946)__call__()
(Pdb) l
[EOF]
(Pdb) l
[EOF]

It steps through the code fine, but for some reason returns end-of-
file when I want to look at the code.
 
D

Diez B. Roggisch

hardcoreUFO said:
I have some code that I am trying to debug (Python 2.5.2 on OSX) using
pdb. However, when the code reaches the pdb.set_trace(), it does not
allow me to view the current line:
/Users/chris/Research/ISEC/build/bdist.macosx-10.3-i386/egg/pyrl/reinforcement.py(943)__call__() (Pdb) n
/Users/chris/Research/ISEC/build/bdist.macosx-10.3-i386/egg/pyrl/reinforcement.py(946)__call__()
(Pdb) l
[EOF]
(Pdb) l
[EOF]

It steps through the code fine, but for some reason returns end-of-
file when I want to look at the code.

It might be that the egg is installed as ZIP. Try either decompressing
it, or re-install using

easy_install -Z <egg>

If it is "your" egg, add zip_safe=False (or such) to the setup.py

Diez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top