有没有办法告诉pdb或ipdb跳过所有未来的断点并完成执行,好像他们不在那里?
答案 0 :(得分:0)
也许你可以尝试清楚。
来自帮助:
'(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.
还有另一个主题可以讨论您的问题:How to exit pdb and allow program to continue?
答案 1 :(得分:0)
如果您想要保留断点而不是清除它们,但又希望它们不被触及,则可以使用pdb
的{{1}}命令。我没有看到以简洁方式禁用所有断点的便捷方法,但您可以在disable
命令中列出它们的数字。您也可以选择此选项,并禁用某些断点并启用其他断点。您可以使用disable
disable
命令撤消pdb
命令的效果。不带参数的enable
命令(或仅break
)显示每个断点是否已启用。