[issue5294] pdb "break" command messes up "continue"

Petr Viktorin report at bugs.python.org
Tue Feb 17 13:06:22 CET 2009


Petr Viktorin <encukou at gmail.com> added the comment:

It doesn't matter whether the breakpoint is set from within a function
or not, but only the module-level frame is affected.

import pdb

def test():
    print ("At line 4")
    print ("At line 5")
    print ("At line 6")
    print ("At line 7")

pdb.set_trace()

print ("At line 11")
print ("At line 12")
test()
print ("At line 13")
print ("At line 14")

$ python pdbfail.py
> /home/petr/tmp/pdbfail.py(11)<module>()
-> print ("At line 11")

...[single-step to line 4]...

> /home/petr/tmp/pdbfail.py(4)test()
-> print ("At line 4")
(Pdb) b 14
Breakpoint 1 at /home/petr/tmp/pdbfail.py:14
(Pdb) c
At line 4
At line 5
At line 6
At line 7
> /home/petr/tmp/pdbfail.py(14)<module>()
-> print ("At line 13")
(Pdb) c
At line 13
> /home/petr/tmp/pdbfail.py(15)<module>()
-> print ("At line 14")
(Pdb) c
At line 14
--Return--
> /home/petr/tmp/pdbfail.py(15)<module>()->None
-> print ("At line 14")
(Pdb) c

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5294>
_______________________________________


More information about the Python-bugs-list mailing list