Is it possible to skip breakpoints in pdb / ipdb?
Asked Answered
H

2

14

Is there a way to tell pdb or ipdb to skip all future break-points and just finish execution as if they weren't there?

Haith answered 7/9, 2016 at 13:46 Comment(2)
possible duplicate of #17821118. I'm not sure, so not voting to close.Language
That "duplicate" is completely unrelatedStreamlined
I
9

Maybe you can try with clear.

From help:

(Pdb) help clear
cl(ear) filename:lineno
cl(ear) [bpnumber [bpnumber...]]
With a space separated list of breakpoint numbers, clear
those breakpoints.  Without argument, clear all breaks (but
first ask confirmation).  With a filename:lineno argument,
clear all breaks at that line in that file.

Note that the argument is different from previous versions of
the debugger (in python distributions 1.5.1 and before) where
a linenumber was used instead of either filename:lineno or
breakpoint numbers.

There is another topic which discuss of your question: How to exit pdb and allow program to continue?

Isotope answered 7/9, 2016 at 13:51 Comment(0)
P
4

If you want to keep your breakpoints rather than clearing them, but also want them not to be reached, you can use pdb's disable command. I don't see a convenient way to disable all breakpoints in a concise way, but you can list their numbers in the disable command. You can also be selective about this, and disable some breakpoints and leave others enabled. You can undo the effect of a disable command with pdbs enable command. The break command (or just b) with no parameters shows, for each breakpoint, whether it is enabled.

Pectize answered 8/9, 2016 at 20:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.