Attach visual studio debugger to user-defined started process programmatically

11 views Asked by At

There are many posts of how to attach a debugger to a running Visual Studio process:

Visual Studio: automatically attach debugger to process as soon as process starts

Starting a process using Visual Studios' DTE with debugger attached

How to attach a Visual Studio debugger to a Managed type process?

all of these suggestions work, but they are rather slow. One of the biggest problems is that when you start a process manually, you get the process id. VS however has its own notion of a Process structure where I have to search through the list of VS Processes to find the matching Process and the Process ID.

My question, to get rid of this problem, if there is a way to start the process directly using the DTE where I hope the debugger is automatically attached? I found there is an IVsDebugLaunch which I can get from the VS ServiceProvider but only when running as a VS extension. But I found no way to get it when using the DTE.

0

There are 0 answers