Question

I have built an SPFeatureReceiver and am trying to debug it by attaching to the w3wp.exe process. No matter what I do no breakpoints are ever hit. Here are my steps

  1. Build and Package the solution
  2. Execute Add-SPSolution PowerShell cmdlet to add wsp to SharePoint
  3. Verify the solution is installed but not deployed in Central Admin
  4. Attach Visual Studion 2010 to all w3wp.exe processes
  5. Execute Install-SPSolution PowerShell cmdlet

I am expecting but no breakpoints are hit. It does not look like symbols are loaded and I don't see anything close to my assembly in the loaded modules page of Visual Studio.

Thanks for the help

Was it helpful?

Solution

Install-SPSolution starts a SharePoint Timer process, so try attaching to the owstimer process instead of w3wp.

OTHER TIPS

According to this post How to debug Feature Receiver you can add this line of code to the method you are trying to debug:

System.Diagnostics.Debugger.Launch();
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top