Vscode-cpptools: [Visual C++] Allow child process debugging

Created on 7 Nov 2017  路  10Comments  路  Source: microsoft/vscode-cpptools

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.

Feature Request debugger

Most helpful comment

I (and the rest of the Chromium community) would really love this!

All 10 comments

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://marketplace.visualstudio.com/items?itemName=vsdbgplat.MicrosoftChildProcessDebuggingPowerTool

https://github.com/microsoft/vscode-cpptools/issues/5505#issuecomment-629528619

https://github.com/microsoft/vscode-debugadapter-node/commit/015ff7144ca351d512e3aa3a72ad29e617531630

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

montery8 picture montery8  路  3Comments

ismadelgad11 picture ismadelgad11  路  3Comments

wdc596933938 picture wdc596933938  路  3Comments

chrisckc picture chrisckc  路  3Comments

SkyRiderMike picture SkyRiderMike  路  3Comments