Xavier de Gaye added the comment: Another example where pdb does not stop at breakpoints set at global, else and finally statements:
$ nl -ba foo.py 1 x = 1 2 def main(): 3 global x 4 try: 5 if not x: 6 x = 2 7 else: 8 x = 3 9 finally: 10 x = 4 11 12 if __name__ == "__main__": 13 main() 14 print(x) 15 $ python3 -m pdb foo.py > /path_to/foo.py(1)<module>() -> x = 1 (Pdb) break 3 Breakpoint 1 at /path_to/foo.py:3 (Pdb) break 7 Breakpoint 2 at /path_to/foo.py:7 (Pdb) break 9 Breakpoint 3 at /path_to/foo.py:9 (Pdb) break 14 Breakpoint 4 at /path_to/foo.py:14 (Pdb) continue > /path_to/foo.py(14)<module>() -> print(x) (Pdb) ============== vim:sts=2:sw=2 ---------- nosy: +xdegaye _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6322> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com