Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Visual Studio be made to debug child processes like WinDBG?

This is similar to this question, but I wanted to flesh it out a bit. (I'm new here, if I should instead do a "bump" answer on the previous question instead, please let me know.)

In WinDBG, I can use the .childdbg 1 command to tell it to break when a child process is spawned, or I can launch it with the -o command-line option. This is very useful in some situations, so it's surprising that (as far as I can see) Visual Studio doesn't support it. It seems like it ought to be pretty easy to clear the DEBUG_PROCESS_ONLY_THIS_PROCESS flag on CreateProcess(), and VS already supports debugging multiple processes.

So, am I missing some option in Visual Studio to enable this? If not, is there a technical rationale for why they have chosen not to support it?

like image 555
David Pope Avatar asked Apr 21 '09 04:04

David Pope


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. To turn the feature on, check this and click “Save”.

Does Visual Studio use windbg?

unfortunately, right now the answer is no. with some effort – going through the visual studio tools | attach to process dialog – you can attach the windbg engine to a . net process. however, the engine does not recognize .

Can you debug in Visual Studio?

In most languages supported by Visual Studio, you can edit your code in the middle of a debugging session and continue debugging. To use this feature, click into your code with your cursor while paused in the debugger, make edits, and press F5, F10, or F11 to continue debugging.


1 Answers

There is now a power tool that lets you attach to child process: Introducing The Child Process Debugging Power Tool

like image 161
Korusef Avatar answered Oct 24 '22 21:10

Korusef