debug 'continue' does not appear to work right

newsposter at cox.net newsposter at cox.net
Mon Dec 12 17:08:20 EST 2005


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




More information about the Python-list mailing list