How to Identify and Attach Correct W3WP Process in Visual Studio while debugging

Sathish Nadarajan
 
Solution Architect
October 1, 2013
 
Rate this article
 
Views
44707

This article explains about how to identify the correct w3wp process for “Attach to Process” in visual studio while debugging.

In most of the time, being a developer, we will be attaching to the W3WP Process. But when we try to attach the process using the Visual Studio, we will be seeing many w3wp processes running. We will be in a dilemma to which we need to attach and at-last, as usual, we will be attaching to all the w3wp processes.

This happens because, the Attach to Process popup doesn’t show the Application Pool details.

clip_image002

To identify the Process for our Application Pool, Open the command prompt as administrator.

Navigate to the folder C:\Windows\System32\inetsrv\. Enter the command “appcmd.exe list wp”. This will list all the worker process associated with the Application Pools.

clip_image004

We know our Application Pool name. Note down the ID corresponding to the Application Pool.

Now coming back to visual studio and click “Attach to Process”. Attach the process with a specific ID which we noted. That’s it. Now we are done with “Attach to Process”. Happy debugging.

Author Info

Sathish Nadarajan
 
Solution Architect
 
Rate this article
 
Sathish is a Microsoft MVP for SharePoint (Office Servers and Services) having 15+ years of experience in Microsoft Technologies. He holds a Masters Degree in Computer Aided Design and Business ...read more
 

Leave a comment