Visual Studio: A guide to using the debugger

Utilize the provided template and add a button to the menu or a custom window. This button should iterate through the currently running processes until an instance of the dllhost.exe with your COM class guid on the command line is found. Once this process is located, attach to it using the Process2 interface (VB code available). To launch the process and debug it through a Visual Studio solution, consider utilizing a simple VS extension. The optimal method for accomplishing this involves starting the process and then attaching it to the debugger.

Solution 1:

The Debug option houses an item referred to as Attach to Process, which can perform the desired action. See

for reference.

In order to connect to a specific instance of devenv.exe, refer to the Title column. It’s worth noting that although the attachment was initiated on BinaryFileSearch, the connection is being made to FixClientNoteRTF. See

for reference.

Attaching to oneself is not possible since hitting a breakpoint would cause the UI to stop responding. In such a scenario, it would become difficult to instruct the system to either step or continue.

Solution 2:

I was able to resolve the issue by changing the way I opened Visual Studio. Instead of opening a normal instance using “devenv.exe,” I opened an experimental instance through the command line using the parameter “/rootsuffix Exp.

Afterward, employ the “attach to debugger” mode to connect to this particular instance.

Frequently Asked Questions

Posted in Uncategorized