Question
How to ignore a specific breakpoint interactively?
Consider this script:
print("before loop")
for i in range(100):
breakpoint()
print("after loop")
breakpoint()
print("exit")
Short of pressing "c" one hundred times, how can you get past the breakpoint within the loop at L3 and proceed to L5?
I've tried the ignore command but couldn't work it out:
$ python3 example.py
before loop
> /tmp/example.py(2)<module>()
-> for i in range(100):
(Pdb) ignore 0
*** Breakpoint 0 already deleted
(Pdb) c
> /tmp/example.py(2)<module>()
-> for i in range(100):
(Pdb) ignore 0
*** Breakpoint 0 already deleted
(Pdb) c
> /tmp/example.py(2)<module>()
-> for i in range(100):
I want to execute the remainder of the loop, without tripping again the breakpoint on L3, then print "after loop" and break before printing "exit", remaining in the debugger. The answer must not require exiting the debugger and re-entering the runtime, or modifying the source code.