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


Sathish Nadarajan
SharePoint MVP
Published On :   01 Oct 2013
Visit Count
Today :  14    Total :   25936
Plan, Migrate, Secure, Report
SharePoint & Office 365 Tool. Simple & Easy to Use. 15-Day Trial!

SharePoint Office 365 Tool
Simple & Powerful Tool for Migration, Security & Reporting. Free Trial


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.

SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Categories

SharePoint Analytics