Gunnar Peipman's ASP.NET blog

ASP.NET, C#, SharePoint, SQL Server and general software development topics.

Sponsors

News

 
 
 
 
 
DZone MVB

Links

Social

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.

  1. Compile your solution and deploy it. 
     
  2. Select Tools –> Options from Visual Studio and clear checkbox from “Enable Just My Code (Managed only) checkbox.
     
    Visual Studio options for debugging 
     
  3. Select Tools –> Attach to Process from Visual Studio and select w3wp process you want your debugger to be attached to.

    Attach to process window
    You can detect correct w3wp.exe process using iisapp.vbs script. Check out the following screenshot.

    Using iisapp.vbs script 
     
  4. 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.

    List of modules running under process 
      
  5. 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.

Comments

Links (2/19/2009) « Steve Pietrek - Everything SharePoint said:

Pingback from  Links (2/19/2009) « Steve Pietrek - Everything SharePoint

# February 19, 2009 7:48 PM

kulwinder_29 said:

Still my breakpoint are not getting hit..

any workaround??

# January 15, 2010 1:20 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)