WinDbg has the .childdbg option which will automatically cause the debugger to attach to child processes when the parent calls CreateProcess.
GDB has a similar option, where you can set it to follow forks. #511 is related, and a workaround is offered in the comments to enable setting the follow fork mode to on. But this is not the ideal solution, because it doesn't provide any solution for the Windows Debug Engine, cppvsdbg. It would be nice if the launch.json configuration supported a simple boolean variable, debugChildProcess which you could set to true or false. By default it's false, and the user can override it.
I'd like to see this, too! :) VS has it; would like to have it in VSCode, too.
I (and the rest of the Edge team) would really love this!
I (and the rest of the Chromium community) would really love this!
Is there any update on this?
Any news here?
Any news?
Anything?
Any workaround in the meantime?
I agree. This would be great.
any news?
What needs to happen for this to move forward? Which part needs to be implemented and roughly where?
It seems like this mostly works in cppdbg with gdb.
cc: @WardenGnaw
More Info:
https://github.com/microsoft/vscode-cpptools/issues/5505#issuecomment-629528619
https://github.com/microsoft/vscode-cpptools/issues/1723
I actually found something that works fairly well for my use case, the multi-process debugging in VSCode works fairly well if both processes are started via the vscode launch config. I have a dll injector, custom dll, and third party application. I start the third party application + dll injector at the same time, now. And this is working great for my purposes. Wish I found it before I spent time adding CreateProcess support into my dll injector!
Most helpful comment
I (and the rest of the Chromium community) would really love this!