Visual Studio 2017 – Reattach to Process

0
46

A number of times, I have been in situations that required troubleshooting certain issues against a running process using “Attach to Process” mechanism. The whole process of bringing up “Attach to Process” dialog, finding the right process and then attaching to it, etc. could become a little tedious process especially when you have to attach, detach and then re-attach against the same process multiple times. There was enough need for a better mechanism that there are Visual Studio extensions available for it in the marketplace. Visual Studio 2017 has introduced a new “Reattach to process” option that makes this process little easier.

Let’s say, I need to debug against running instance of IISExpress. I’ll first bring up the Debug -> Attach to Process menu option.

1

We can then find the process from this dialog and then Attach to for debugging.

2

Once the troubleshooting is done, we can just Stop Debugging this.

3

So far so good. However, if I need to go back and attach to the same process again and again, I needed to repeat all the above steps again & again too. However, if you are using Visual Studio 2017, you should be able to see the following “Reattach to Process” option that will start debugging same IISExpress process again without doing all those steps.

4

Until next time, happy debugging!!

Filed under: CodeProject, Debugging, Visual Studio 2017

LEAVE A REPLY