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

Forum statistics

Threads
473,771
Messages
2,569,587
Members
45,099
Latest member
AmbrosePri
Top