I’m writing a simple VisualStudio addon to attach the debugger to any IIS processes (w3wp.exe). This is the first time I’ve written a VS addon. I’ve created the initial addon using the VS template, and have that successfully displaying a winform with a listbox showing the w3wp processes. I’m having trouble finding information on how to programatically attach the current instance of Visual Studio to a process. I have the process-id already. Could someone point me in the right direction? I’ve looked on the MSDN site, but can’t find which section.
I’m writing a simple VisualStudio addon to attach the debugger to any IIS processes
Share
I’m not sure about add-ons, but you can do it easily enough with a VS Macro:
For example, the following code will attach the current VS instance to the first copy of IISExpress it finds running. If you have access to the DTE in your add-on, then you could do a similar thing (I’ve not written an add-on so I’m not sure).