中断(暂停)在pdb中运行Python程序? [英] Interrupt (pause) running Python program in pdb?
本文介绍了中断(暂停)在pdb中运行Python程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在gdb中,您可以通过C-c中断(暂停)程序并恢复。
In gdb, you can interrupt(pause) the program by C-c and resume.
你可以在pdb这样做吗?
Can you do this in pdb?
推荐答案
根据这个错误报告可能在Python 3中修复。
Based on this bug report it might be fixed in Python 3.
在2.x中,Ctrl-C将抛出一个KeyboardInterrupt,该程序通常被程序无法处理,并将调试器置于验尸模式。你不能继续下去。
In 2.x Ctrl-C will throw a KeyboardInterrupt, which is typically unhandled by the program, and will put the debugger into 'post-mortem' mode. You cannot continue where you left off.
我不知道还有其他一些方法可以做你所描述的。
I don't know if there's some other way to do what you are describing.
这篇关于中断(暂停)在pdb中运行Python程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文