18 02 2009
Debugging SharePoint solutions using Visual Studio
Debugging SharePoint solutions with Visual Studio on local machine is pretty easy. Although you can find articles about how to deploy your PDB files to global assembly cache etc it is more simpler than that. Just follow the steps below. Btw you can click on images if you want to see them on original size.
- Compile your solution and deploy it.
- Select Tools –> Options from Visual Studio and clear checkbox from “Enable Just My Code (Managed only) checkbox.
- Select Tools –> Attach to Process from Visual Studio and select w3wp process you want your debugger to be attached to.
You can detect correct w3wp.exe process using iisapp.vbs script. Check out the following screenshot.
- If you want to see what modules are used by process just type CTRL+ALT+U and see if your assemblies are also listed there.
- Enjoy debugging!
You can set break points in your code and debugger stops code execution at these. So it is like debugging usual ASP.NET applications.