Monday, August 5, 2013

How to Debug SharePoint 2010 Web Parts from Visual Studio 2010

Debugging SharePoint 2010 Web Parts from Visual Studio 2010 :


For debugging your web part in SharePoint 2010, you should follow below steps as given:
  1. Deploy your Web Part
  2. Add the Web Part to Page
  3. In your code, create a break point.
  4. Go to “Debug” menu, and choose “Attach to Process”.
  5. Under “Attach to:” section, click on “Select …” button.
  6. Check the “Show processes in all sessions” checkbox.
  7. Select all “w3wp.exe” Processes, then click on the “Attach” button.
  8. Run your page that contains the Web Part. You should now hit your break point, and will be able to step through your code.

Related Posts: