Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Attach child process to debugger automatically

If the main process is currently being debugged in Visual Studio, how can I have it so any new processes it spawns are also attached to the same instance of Visual Studio as the main process is?

Currently the new processes are created just with a CreateProcess call, however I can add extra code or use a different API altogether if needed, as well as making changes to the project or solution configurations (each process has its own project in a single solution).

like image 394
Fire Lancer Avatar asked Aug 17 '09 16:08

Fire Lancer


People also ask

How do you Debug a child process in Visual Studio?

Once you install the power tool from the Visual Studio Gallery, a new menu item will appear on the “Debug” menu under the “Other Debug Targets” sub-menu. When you open the settings page, you'll see a checkbox to enable child process debugging.

How do debuggers attach to processes?

You can attach the Visual Studio debugger to a running process on a local or remote computer. After the process is running, select Debug > Attach to Process or press Ctrl+Alt+p in Visual Studio, and use the Attach to Process dialog to attach the debugger to the process.


1 Answers

I know I am few years late here but Visual Studio 2013 should support this after installing an extension: https://visualstudiogallery.msdn.microsoft.com/a1141bff-463f-465f-9b6d-d29b7b503d7a

like image 194
Marian Spanik Avatar answered Oct 21 '22 19:10

Marian Spanik