Interrupt (pause) running Python program in pdb?

后端 未结 2 1628
旧巷少年郎
旧巷少年郎 2020-12-16 10:45

In gdb, you can interrupt(pause) the program by C-c and resume.

Can you do this in pdb?

2条回答
  •  北荒
    北荒 (楼主)
    2020-12-16 11:16

    Based on this bug report it might be fixed in Python 3.

    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.

提交回复
热议问题