2016-09-07 37 views
2

有沒有辦法告訴pdb或ipdb跳過所有未來的斷點,只是完成執行,就好像它們不在那裏一樣?是否可以跳過pdb/ipdb中的斷點?

+0

http://stackoverflow.com/questions/17820618/how-to-exit-pdb-and-allow-program-to-continue的可能重複。我不確定,所以沒有投票結束。 –

回答

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

如果你想保持你的斷點,而不是清除它們,但也希望他們不要被達到,你可以使用pdbdisable命令。我沒有看到一種方便的方式來以簡明的方式禁用所有斷點,但您可以在disable命令中列出它們的編號。你也可以對此有所選擇,並禁用一些斷點並保持其他功能的啓用。您可以使用pdb s enable命令取消disable命令的效果。不帶參數的break命令(或只是b)顯示每個斷點是否已啓用。

相關問題