Visual Studio 2012 Breakpoints do not hit
I have made a simple visual webpart for SharePoint 2013 in visual studio 2012. The .apsx page only has one label.Then i say deploy and attach to process w3wp and refresh the webpage where i have added the visual webpart.In the code i have put breakpoints at the start on oninit() and pageload() methods. But when i refresh the page i find the label but the code behind does not run and the breakpoints are not hit. When i hover the break points i get following message.
- Make sure it's a debug build and not release
- Turn off optimizations in your project properties if they are on
- Try inserting Debugger.Break() in your code instead of a breakpoint in VS
- Make sure breakpoints are enabled (Debug->Windows->Breakpoints toolbar), and breakpoint symbol should be solid
- Execute your application. Load Debug->Window->Modules window. Check your assembly to see if symbols are loaded. It may give a relevant status message if not.