Support Child Process Debugging
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 737
- Avg merge
- 18h 40m
- Merged PRs (30d)
- 31
Description
launch configuration looks something like
```json
{
"name": ".NET Debug Tool",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": [
"tool",
"run",
"{toolname}"
],
"cwd": "${workspaceRoot}",
"stopAtEntry": true,
"externalConsole": false,
"justMyCode": false,
"symbolOptions": {
"searchNuGetOrgSymbolServer": true
}
}
```
I supect this is becauase tools are launched as a child process i.e:
`dotnet tool run "toolname"`
will with local manifest i.e. resolve tool in nuget cache and start a new process something like
`dotnet.exe C:\Users\{user}\.nuget\packages\{toolname}\{version}\tools/{framework moniker}/any/{tool}.dll`
If change to launch `C:\Users\{user}\.nuget\packages\{toolname}\{version}\tools/{framework moniker}/any/{tool}.dll` directly debugging works directly from F5 but that doesn't scale between machines and how tools are resolved arent super obvious.
Is there anything avail/planned like Node.JS `autoAttachChildProcesses`?
Attaching manually works, but that also requires .NET tool to wait for debugger.
If manually attaching is only option it would be nice if it could be automated i.e. i could expose child process id in console output so if there were something `serverReadyAction` where the `action` wasn't `openExternally` but something like
```
"serverReadyAction": {
"action": "attachDebugger",
"pattern": "\\bAttach debugger to process\\s([0-9]+)\\b to continue\\.\\.\\.",
}
```
To find a pattern like `Attach debugger to process xxxxx to continue...`
In full Visual Studio it works by installing the [Microsoft Child Process Debugging Power Tool](https://marketplace.visualstudio.com/items?itemName=vsdbgplat.MicrosoftChildProcessDebuggingPowerTool)
Contributor guide
Assessment
This issue has not been assessed yet.