I need to debug my feature receiver, so I set up few breakpoints, but when I hit F5 in VS2010, they are all missed, and it says that "The breakpoint will not currently be hit. No symbols have been loaded for this document." What should I do to be able to debug my feature receiver?
3 Answers
Please follow this tutorial, I have done it thousands of time and it always work the same way.
-
5The key is setting the deployment configuration to No Activation otherwise your Feature Receiver runs during deployment and cannot be debugged Commented Sep 29, 2011 at 14:50
-
Using System.Diagnostic.Break() will work perfectly on activating, or am I wrong here ? Commented Feb 14, 2012 at 8:43
Also the dlls are deployed in GAC , so make sure change the settings. Follow this article
http://www.sharepointnutsandbolts.com/2007/03/how-to-debug-sharepoint-feature.html
First try rebuilding your project If that doesn't work, try to clean the project.
If that also doesn't work follow these steps.
- Right click your project
- Select [Properties]
- Select the [Build] tab
- Make sure [Define DEBUG constant] and [Define TRACE constant] are checked
- Click the [Advanced] button at the bottom of the Build tabpage
- Make sure that [Debug Info] is set to [full]
- Click [OK] and rebuild the project