Petr Viktorin <encu...@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 <rep...@bugs.python.org> <http://bugs.python.org/issue5294> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com