Open justinmchase opened 3 years ago
@PeterWone since you are so passionate about supporting gentile termination, I will go ahead and reopen #4553 and move your comments there. This work item will continue to be about terminating child processes when we terminate the root process.
@gregg-miskelly That's very kind of you.
I have cloned the code-base to look into the issues of implementing this. If you have any start-here pointers they would be welcome. For example, where to find the button handler code and some notes on how it's put together.
@PeterWone I will follow up in the other issue.
I forgot I had previously created this issue and just went to bing and searched for "vscode stop debugging orphans processes" and found my own issue :)
I guess this is still an active issue.
This happens for me but not related to OmniSharp because I run the programs from terminal tabs and when I close VSCode, they are still in the process list
kubuntu 21.10
Issue Description
I have setup a launch json and when I press F5 it uses
Process.Start
to create some long running child procesess. If I detach the debugger my application process is killed, but the child processes are orphaned. These processes hold open fixed ports and simply pressing F5 a second time crashes the app since the ports are already open.Steps to Reproduce
I can make a reproduction but its fairly complicated... But something like:
F5
Shift+F5
(detach debugger)F5
againExpected Behavior
The app successfully runs a second time and child processes are able to open their respective ports.
Actual Behavior
Child processes remain running and ports are locked.
Logs
OmniSharp log
N/A
C# log
N/A
Environment information
VSCode version: 1.52.0 C# Extension: 1.23.8
Mono Information
OmniSharp using built-in monoDotnet Information
.NET Core SDK (reflecting any global.json): Version: 3.1.404 Commit: 470f6754b3 Runtime Environment: OS Name: Mac OS X OS Version: 10.15 OS Platform: Darwin RID: osx.10.15-x64 Base Path: /usr/local/share/dotnet/sdk/3.1.404/ Host (useful for support): Version: 3.1.10 Commit: 1721e39439 .NET Core SDKs installed: 3.1.404 [/usr/local/share/dotnet/sdk] .NET Core runtimes installed: Microsoft.AspNetCore.App 3.1.10 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.10 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-downloadVisual Studio Code Extensions
|Extension|Author|Version| |---|---|---| |csharp|ms-dotnettools|1.23.8| |debugger-for-chrome|msjsdiag|4.12.11| |githistory|donjayamanne|0.6.14| |gitlens|eamodio|11.1.0| |insert-unicode|brunnerh|0.10.0| |prettify-json|mohsen1|0.0.3| |remote-containers|ms-vscode-remote|0.154.1| |vscode-docker|ms-azuretools|1.9.0| |vscode-nuget-package-manager|jmrog|1.1.6|;