Wednesday, January 19, 2011

How to debug a web part in SharePoint

Here is the steps to debug a web part in SharePoint :

Step 1:
open the project and set the appropriate breakpoints.
Step 2:
Create a Web Part Page on the default SharePoint site.
Step 3:
Add the Web Part to the page.
Step 4:
  • Attach the debugger to the W3wp process.
  • On the Debug menu in Visual Studio .NET,click Processes.
  • Verify that the Show system processes check box is selected.
  • Verify that the Show processes in all sessions check box is selected.
  • Under Available Processes, click W3wp.exe in the Process list, and then click Attach.
  • Under Choose the program types that you want to debug, select Common Language Runtime, and then click OK, Then Close
For more Refer: http://msdn.microsoft.com/en-us/library/dd583148(office.11).aspx

1 comment: