Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
968 views
in Technique[技术] by (71.8m points)

debugging - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...