Issue 14912: Pdb does not stop at a breakpoint after a restart command and source changes (original) (raw)
In the following session, main.py is changed just before the restart command. Pdb does not stop at Breakpoint 1 after the last continue.
$ python -m pdb main.py
/path_to/main.py(1)() -> def foo(): (Pdb) import sys; print(sys.version) 3.2.2 (default, Dec 27 2011, 17:35:55) [GCC 4.3.2] (Pdb) break foo Breakpoint 1 at /path_to/main.py:1 (Pdb) list 1 B-> def foo(): 2 x = 1 3 x = 2 4 5 foo() [EOF] (Pdb) continue /path_to/main.py(2)foo() -> x = 1 (Pdb) restart Restarting main.py with arguments: main.py /path_to/main.py(1)() -> def bar(): (Pdb) list 1 B-> def bar(): 2 x = 1 3 x = 2 4 5 def foo(): 6 bar() 7 8 foo() [EOF] (Pdb) continue The program finished and will be restarted /path_to/main.py(1)() -> def bar(): (Pdb)