How to send CTRL+C to process when debugging
已回答
I am debugging and want to send the a CTRL+C to the process being debugged. I want to debug the behavior when receiving a SIGINT.
It seems CTRL+key sequences are filtered by the IDE and not send to the process.
Is there another way?
It seems CTRL+key sequences are filtered by the IDE and not send to the process.
Is there another way?
请先登录再写评论。
Having the same problem...
Could anyone answer this question please?
Hi,
If you hover your mouse over the Stop button, you will see the tooltip with a shortcut. You can then go to settings --> Keymap and find this action by shortcut and customozise as you wish.
In CLion 2019.2, at least, the debugger's Stop button doesn't send a SIGINT, it sends a SIGKILL (I think - its not SIGINT anyway). However in the Run state, the Stop button does send a SIGINT. I haven't been able to find a way to send a SIGINT to the debugged process from within CLion.
in new version like goland , you can send ctrl+c to debugger console to send sig
> you can send ctrl+c to debugger console to send sig
Unfortunately this doesn't seem to work (yet?) in CLion 2020.2.
In CLion 2021.2.2, I am able to send SIGINT (Ctrl+C) to the debug target with this sequence:
1. Pause program being debugged
2. Switch to GDB Console
3. Send the SIGINT signal with the GDB command 'signal 2'
Output from GDB looks like this:
The program will resume from the point it was paused and the Ctrl+C signal is then processed.
For me `signal 2` did not work, I had to do,