From http://www.cnblogs.com/BigSeal/archive/2004/10/08/49738.html? Login = 1 # post
1. Set breakpoints
1. Make sure that the project output path is located in the bin folder under the root directory of the SharePoint site.
2. Load the Web Part Program Set registration as a security control
2. Add an ASP. NET Process
1. Manually attach a process
Debug-> process-> set w3wp.exe as an additional process and select the CLR check box
2. Use the startup URL and automatically attach it to the Process
Project properties-> Configuration properties-> debugging-> enable ASP. NET to set debugging to true, debug mode to URL, and start URL to Web Part page containing Web parts.
3. Open the website's web. config file
<System. Web> T tag,
<Compilation batch = "false"/> Label, change it
<Compilation batch = "false" DEBUG = "true"/> .
Iii. debugging
- In the Web. config file, search for
<SharePoint>Tag.
- In
<SharePoint>Tag, locate<Safemode maxcontrols = "50" callstack = "false"/>Tag and change it<Safemode maxcontrols = "50" callstack = "true"/>.
- In the Web. config file, search for
<System. Web>Tag.
- Within
<System. Web>Tag, locate<Customerrors>Tag and change it<Customerrors mode = "off">.
Note: You can change <trust level = "wss_mimum" originurl = ""/> in Web. config to <trust level = "wss_medium" originurl = ""/>