python怎么退出调试模式_python – 在验尸调试时如何退出ipdb?
我喜歡使用以下方式檢查
Python腳本中的錯誤:
$python3 -m pdb my_script.py
這會讓我進入一個pdb提示,從那里我可以繼續執行,當它遇到錯誤,我可以檢查變量,然后q退出腳本執行以回到我的shell.
我嘗試與iPython調試器模塊相同,因為它更加豐富多彩:
$python3 -m ipdb my_script.py
但是,一旦檢查到錯誤,我就無法退出調試器.使用q quit命令只是在重新執行腳本和驗尸模式之間切換它:
$python3 -m ipdb my_script.py
ipdb> c
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
ipdb> Inspect some variables at this point
ipdb> q
Post mortem debugger finished. The my_script.py will be restarted
ipdb> q
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
ipdb> q
Post mortem debugger finished. The my_script.py will be restarted
ipdb> q
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
ipdb> q
Post mortem debugger finished. The my_script.py will be restarted
ipdb> q
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
如何退出這個調試器?
總結
以上是生活随笔為你收集整理的python怎么退出调试模式_python – 在验尸调试时如何退出ipdb?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 不良事件总结怎么写_个人年终工作总结怎么
- 下一篇: 怎么抓python程序的包_如何在AWS