Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pass SIGINT while pressing ctrl+c on using debugger in vscode

I know we could use the handle signal command in gdb to make it pass the SIGINT signal to the program. Is there a way to do the same while using the debugger in vs code?

like image 283
PorottayumBeefum Avatar asked Mar 07 '19 13:03

PorottayumBeefum


2 Answers

In the Debug Console of vs code write:

-exec handle SIGINT pass
-exec handle SIGINT nostop

like image 50
Putte Avatar answered Sep 16 '22 15:09

Putte


Open another terminal.

ps -eaf |grep <Proc-Name>   //  find the PID

kill -s SIGINT PID_OF_PROCESS

Get back to VS Code Now you can see and use the stacktrace etc.

like image 44
ashishk Avatar answered Sep 16 '22 15:09

ashishk