-
Notifications
You must be signed in to change notification settings - Fork 701
Node.js doesn't quit while stop debugging #2387
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
Comments
@chesteryang The debugger doesn't know anything about these node.js processes, so it will not kill them. This is true for both Visual Studio and VS Code. Is your code spawning them? |
@gregg-miskelly in Startup.cs,
in package.json This script will create those nodejs processes. But in Visual Studio 2017, default to IIS express, stop debugging will kill all of them. |
and in command line, if I use dotnet run to start app, I can use ctrl+c to shut down dotnet process and all its child processes. |
So you can get the command line behavior if you set For a better fix: if I am tracking things down correctly, it sounds like you are running into a bug in the ASP.NET JavaScriptServices. There is an issue that sounds just like you describe here: aspnet/JavaScriptServices#270 Looking at what I think is their code to spawn node, they seem to be providing their parent pid for this purpose. |
Should have also said: so I would probably suggest opening a new issue in that repo if you are running a build that should have that fix. |
@gregg-miskelly Okay, thanks. |
Environment data
dotnet --info
output:dotnet-info.txt
VS Code version:1.24.1
C# Extension version:1.15.2
The issue was filed to vscode first: microsoft/vscode#51933
Steps to reproduce
In process explorer this was found:
In debugging, process (id=13360) is a child process under dotnet.exe process (id=11188)
Out of debugging, the process (id=13360) didn't get killed and its parent is gone.

Expected behavior
It should work like Visual Studio 2017's debugging, while stopping debugging, all nodejs processes should be killed.
Actual behavior
nodjs processes are hanging in memory.
The text was updated successfully, but these errors were encountered: