debug 'continue' does not appear to work right

N

newsposter

When I enter 'c' at the (Pdb) prompt it just goes to the next line, and
doesn't "continue" as it should.

Here's the sample program:

# epdb1.py -- experiment with the Python debugger, pdb
import pdb
a = "aaa"
pdb.set_trace()
b = "bbb"
c = "ccc"
final = a + b + c
print final

Here's the sample output:

S:\tmp>python epdb1.py
--Return--
c:\python21\lib\pdb.py(895)set_trace()->None
-> Pdb().set_trace()
(Pdb) n
S:\tmp\epdb1.py(5)?()
-> b = "bbb"
(Pdb) l
1 # epdb1.py -- experiment with the Python debugger, pdb
2 import pdb
3 a = "aaa"
4 pdb.set_trace()
5 -> b = "bbb"
6 c = "ccc"
7 final = a + b + c
8 print final
[EOF]
(Pdb) c
S:\tmp\epdb1.py(6)?()
-> c = "ccc"
(Pdb) c
S:\tmp\epdb1.py(7)?()
-> final = a + b + c
(Pdb) c
S:\tmp\epdb1.py(8)?()
-> print final
(Pdb) c
aaabbbccc
--Return--
S:\tmp\epdb1.py(8)?()->None
-> print final
(Pdb) c

S:\tmp>

Any ideas on why the debugger doesn't just continue running the
program?

Thanks!
Chris
 
N

newsposter

I was running the above from the command-line, but when I run the
program within IDLE, 'c', continue, works as it should.
-Chris
 
D

David Wahler

When I enter 'c' at the (Pdb) prompt it just goes to the next line, and
doesn't "continue" as it should. [...]

Here's the sample output:

S:\tmp>python epdb1.py
--Return--
c:\python21\lib\pdb.py(895)set_trace()->None
-> Pdb().set_trace()
[...]

Works for me with Python 2.4.2. Since you seem to be using Python 2.1,
which was released about 4 years ago, it's likely just an old,
long-since-fixed bug. Is there some reason you can't upgrade?

-- David
 
N

newsposter

Ok, thanks. I see what the problem is.

I am working on an application which requires Python 2.1, but I also
installed Python 2.4.2. It appears that my path for the command-lines
is setup with 2.1 first.

Thanks,
Chris
 

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,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top