Most of the times, during SharePoint debugging,we see that while trying to attach to process “w3wp”, many process with same name are listed.
How to determine which process we need to attach to? As the dialog box does not contain Application Pool details. Follow the steps given below to easily identify the correct worker process.
- Open the Command Prompt with Administrative Privilege
- Change the directory to c:\Windows\System\Inetsrv
- run “appcmd list wp“. It would list all the worker processed with ID and application pool information:
4. Find out process ID associated to the web application pool you want to debug.
5. Go back to Visual Studio “Attach to Process” dialog box and associate to correct process with ID we got in Step # 4.