No, python2’s pdb doesn’t support this, but you add this code to your program as a workaround:
def debug_signal_handler(signal, frame):
import pdb
pdb.set_trace()
import signal
signal.signal(signal.SIGINT, debug_signal_handler)
Related questions:
- Showing the stack trace from a running Python application
- enter pdb with kill signal