将来のすべてのブレークポイントをスキップして、そこにないかのように実行を終了するように pdb または ipdb に指示する方法はありますか?
7050 次
2 に答える
2
ブレークポイントをクリアするのではなく保持したいが、到達したくない場合は、pdb
のdisable
コマンドを使用できます。簡潔な方法ですべてのブレークポイントを無効にする便利な方法はわかりませんが、disable
コマンドでそれらの番号を一覧表示できます。これを選択して、一部のブレークポイントを無効にし、他のブレークポイントを有効のままにすることもできます。sコマンドdisable
を使用すると、コマンドの効果を元に戻すことができます。パラメーターを指定しないコマンド (または単に)は、ブレークポイントごとに有効かどうかを示します。pdb
enable
break
b
于 2016-09-08T20:42:57.353 に答える
1
たぶんあなたはクリアで試すことができます。
ヘルプから:
(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?
于 2016-09-07T13:51:25.477 に答える