-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
debugger doesnt stop when exiting extension development host #32990
Comments
@bpasero I've debugged this on the debugger side and it seems that closing the EH window does neither terminate the EH node process nor does it send any broadcast events for this. |
@weinand this seems to be a regression from us moving to Could it be that the debugger needs to explicitly send some signal to the debuggee to signal the session is over and otherwise the process will never terminate? |
/cc @alexandrudima because I know he refactored a lot of the extension host process recently to support restarting. I am not sure if there was any impact on how the process shutsdown (e.g. I see a newly introduced |
@bpasero yes, a terminate request from the debugger might be necessary. The problem is that the debugger doesn't know when the EH window's close button has been pressed. So we would at least need another broadcast event for this. |
The issue is that @roblourens do you know anything about this? Could it be that there is a specific shutdown handshake between the runtime and the debugger is needed to exit the process properly? Debugging this node program with the "inspector" protocol shows the same behaviour: process.exit();
console.log("not reached"); The console.log statement is not reached but the node process doesn't exit. Using @alexandrudima @bpasero how should we proceed? |
If that works, why not use |
Yes, if Rob has no better ideas I suggest that we use |
There was an issue in Node <8 where the process doesn't terminate or signal that it's complete until the debugger detaches. Now we get an event from node that the script has completed, and terminate the debugging session. This is probably related. I'm surprised that it impacts |
If it's ugly, we can revisit it with an electron version that has a node 8 equivalent (1.7.5 says node 7.9?) and maybe remove it then. |
@alexandrudima could you please add the |
This is the nodejs PR that introduced this --- nodejs/node#7252 |
@roblourens this means it is a feature and our "inspector" DA should really detach when process.exit() is called. |
Correct. Original node2 issue: microsoft/vscode-node-debug2#11 It didn't occur to me that this would impact EH debugging, thanks for the investigation and fix. I opened #33196 to revisit this once Electron has Node 8. |
F5
to launch the debuggerextension development host starts up
close the extension development host)
results:
The text was updated successfully, but these errors were encountered: