Wors World
All About Wor

Debugging SharePoint Code

If you’re hoping to debug code that you’re deploying to SharePoint you’re gonna need too know which w3wp.exe (the code that runs the web app that runs your code) to connect to.  The reason you may not know which w3wp.exe to connect to is that each app pool runs a new instance of w3wp.exe and when you select Debug/Attach to Process it’s possible that you may see more than 1.  So which one to attach to????
 
If you start a command prompt and type iisapp you’ll be presented with a list of the app pools that IIS is running – each of which has the name of the application and the PID listed.  Attach to the w3wp.exe which has the correct PID alongside it.
 
This works with IIS6 but apparently not with IIS7 see Michael Lotters blog on this.
Advertisements

No Responses to “Debugging SharePoint Code”

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

%d bloggers like this: