我對python和pdb比較陌生,但我對gdb有很多經驗。PDB.run - 重新啓動pdb會話
我的問題是,如果我在某些時候在代碼中設置了多個斷點,我將想要更改某些內容並重新運行保留這些斷點的調試會話。然而,在我的PDB會話的情況下進入「運行」我會與下面的輸出
(Pdb) run
Traceback (most recent call last):
File "/usr/lib64/python2.6/runpy.py", line 122, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib64/python2.6/runpy.py", line 34, in _run_code
exec code in run_globals
File "/usr/lib64/python2.6/pdb.py", line 1319, in <module>
pdb.main()
File "/usr/lib64/python2.6/pdb.py", line 1312, in main
pdb.interaction(None, t)
File "/usr/lib64/python2.6/pdb.py", line 198, in interaction
self.cmdloop()
File "/usr/lib64/python2.6/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/usr/lib64/python2.6/pdb.py", line 267, in onecmd
return cmd.Cmd.onecmd(self, line)
File "/usr/lib64/python2.6/cmd.py", line 219, in onecmd
return func(arg)
File "/usr/lib64/python2.6/pdb.py", line 661, in do_run
raise Restart
pdb.Restart
]$
我已經試過這兩個獨立的Linux平臺,並有同樣的結果結束,但我不能找到文檔中的任何更正。
是的,有人在乎。謝謝! – Oddthinking
這仍然是pdb中的一個錯誤 – erjoalgo
剛剛重啓後可以'c',對不對? –