How to detachProcess gracefully

Dec 29, 2016 at 9:39 AM
Edited Dec 29, 2016 at 9:42 AM
If the code is simple enough without calling pykd.go(), The two methods attachProcess and detachProcess work perfectly well.

If I add a callback based on pykd.eventHandler and run the method pykd.go, I don't know how to detachProcess gracefully.

I want to press CTRL+C to detach the debugger from debuggee. But calling pydk.detachProcess() will fail, the debuggee will be closed as well.
def signal_handler(signal, frame):
    print("You pressed Ctrl C!")
Dec 29, 2016 at 9:56 AM
Try to add pykd.break() before pykd.detachProcess