Reputation: 3062
I have a simple nodejs application like
...
function checkTermination () {
console.log('start closing ...');
...
}
process.on('SIGTERM', checkTermination);
process.on('SIGINT', checkTermination);
I'm debugging it with Visual Studio Code.
Is there an opportunity to send some signals like SIGINT
, SIGTERM
to the application with "Visual Studio Code" ? How can I do this?
Upvotes: 3
Views: 4523
Reputation: 495
When launched:
'SIGINT'
signal to your process
'SIGKILL'
When attached to:
See https://github.com/microsoft/vscode-node-debug/issues/1#issuecomment-405123769
Upvotes: 0
Reputation: 1299
I have a program named test.js, attached to VS code.
ps aux | grep node | grep test
//Result
user1 3580 0.0 0.2 3115916 35648 ?? S 3:29PM 0:00.29 /usr/local/bin/node --inspect-brk=48750 test.js
// Send the signal
kill -TERM 3580 // 3580 is the PID
Upvotes: 5