This is an article in a series of Sitecore how-to articles. These articles are meant to be quick guides to accomplish various tasks within Sitecore. The how-to articles have proven to be very helpful internally at One North https://www.onenorth.com. These articles assume working Sitecore knowledge. I just wanted to share the articles with the community. Hopefully you find them helpful.
When debugging with Visual Studio, you need to attach to a w3wp process. If you have multiple Application Pools running, however, you will get multiple instances of w3wp.exe running, and it isn’t immediately obvious which one you should attach to to debug a given website. There are steps you can follow to find out which process belongs to your website’s Application Pool.
With Task Manager
- Open Task Manager
Ctrl + Shift + Esc
- Show the Command Line and PID columns by right-clicking the header row and selecting the appropriate item from the multi-list.
- Sort by Name to find processes named “IIS Worker Process”
- Find the IIS Worker Process that has your website’s name in the Command Line column and take note of the PID.
With the command line
- Run cmd.exe as Administrator
- Run the following command:
C:\Windows\System32\inetsrv\appcmd.exe list wp
- Find your website’s Application Pool in the output and take note of the corresponding PID, which is the w3wp.exe process you are looking for.