Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: debug process termination signal #54866

Closed
2 tasks done
isidorn opened this issue Jul 23, 2018 · 0 comments
Closed
2 tasks done

Test: debug process termination signal #54866

isidorn opened this issue Jul 23, 2018 · 0 comments
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues testplan-item
Milestone

Comments

@isidorn
Copy link
Contributor

isidorn commented Jul 23, 2018

Refs: #54384

Complexity: 3

Authors: @weinand, @isidorn

In this release the "Debug: stop" command (either from the command palette or the debug toolbar) does no longer kill the debuggee forcefully but gives it a chance to terminate itself gracefully.

For Node.js debugging this means that the debuggee receives a SIGINT signal (which results in a termination if not intercepted).

If the debuggee fails to terminate, triggering the "Debug: stop" again will forcefully kill the debuggee (like VS Code did previously).

Verify for Node.js debugging that:

  • Triggering a debug stop command can be intercepted by the debuggee by the approach shown below,
  • Triggering a debug stop command for the second time forecfully kills the debugee,
  • Termination signal is not sent for "attach" configurations,
  • Extension host debugging works like before (you can start, reload, restart, quit with no problems).

a snippet for intercepting the SIGINT:

process.on('SIGINT', () => {
    console.log('Received SIGINT.');
    process.exit();
});

let i= 0;
setInterval(() => {
    console.log(`hello: ${i++}`);
}, 1000);
@isidorn isidorn added debug Debug viewlet, configurations, breakpoints, adapter issues testplan-item labels Jul 23, 2018
@isidorn isidorn added this to the July 2018 milestone Jul 23, 2018
@isidorn isidorn assigned aeschli and unassigned sbatten Jul 31, 2018
@aeschli aeschli removed their assignment Jul 31, 2018
@roblourens roblourens removed their assignment Jul 31, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues testplan-item
Projects
None yet
Development

No branches or pull requests

4 participants