Visual Studio 2017 – Reattach to Process

I have been in situations number of times 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 little tedious process especially when you have to attach, detach and then re-attach against 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 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, happy debugging!!

Advertisements
This entry was posted in CodeProject, Debugging, Visual Studio 2017. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s