Wednesday, May 16, 2012

Debugging SharePoint 2010 Web Part from Visual Studio 2010

Involved Steps

1. Deploy your webpart
2. Add the webpart to webpart page in a sharepoint site.
3. Place a break point in that webpart code file.



4.GO To "Debug" menu, and choose "Attach to Process".



5.By default the following settings are selected in "Attach to:"



under "Attach to: " section, Click on  "Select Button"



By default "Automatically determine the type of code to debug" is selected. Now change the selection to

"Debug these code types" and check "Managed(V2.0,V1.1,V1.0)" and click "OK".

6. Check the "Show processes in all sessions" check box.



7. Now scroll down in Available process and select all w3wp.exe and Click on "Attach" button



8. Now run the page that contains the webpart and click the your button(where i placed breakpoint)




in visual studio breakpoint is hitted so now am able to step through the code.


No comments:

Post a Comment