SharePoint 2010: Debugging Visual Studio 2010

Method I:

  1. Go to “Debug” and select “Attach to Process”
  2. Make sure “Show processes in all sessions” checkbox is checked
  3. Select all “w3wp.exe” processes and click on “Attach” button

If it does not work,

  1. Go to “Debug” and select “Attach to Process”
  2. Click on “Select…”.”Select Code Type” window will appear
  3. Select “Debug these codes types” and check “Managed (v2.0, v1.1, v1.0)” only

Method II:

  1. Write “System.Diagnostics.Debugger.Launch()” in the code where you want to attach debugger
  2. When you run the code, a popup window will appear asking for attaching debugger.
  3. Click “Yes” and guide to appropriate instance of Visual Studio

Method III:

Use third party software like:

  1. Visual Studio 2010 extension for helping SharePoint 2010 debugging
Advertisements

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: