Reputation: 75073
As you can notice
Symbols are been correctly loaded.
I just created a view GetCompanies.cshtml
using the AddView
shortlink
But, no matter what I do, I can't debug in the View.
What I did so far:
.pdb
did not (yet) shutdown Windows 7 x64 :-/
Upvotes: 18
Views: 40809
Reputation: 1
delete bin and obj directories run solution again. Note: Unless that cshtml loads at runtime the symbols are not loaded. On page load that breakpoint will be hit. So wait till control goes to that page
Upvotes: -1
Reputation: 1561
Remember that views are actually compiled when you request the page (by default).
This means when you set a breakpoint in a view:
So basically its not meaningful information to look at what it says when you mouseover the breakpoint in a view (at least in this regard)
If you are trying to debug this page, then you have a problem. Look at what the debugger is outputting to your BROWSER instead and fix that first. I think we'll be surprised about how many people are going to facepalm at this.
Upvotes: 1
Reputation: 30198
For me, I somehow switched my target build to Release
instead of Debug
Upvotes: 1
Reputation: 8200
I was attempting to debug a deployed WCF windows services (compiled in Release mode) and had the exact same issue. Give this a shot...
Worked like a charm (finally) for me.
Upvotes: 0
Reputation: 91
Sometimes if you have a hard stop, Visual Studio temp cache will be screwed. Clear the cache by deleting these folders:
C:\Windows\Microsoft.NET\Framework\<.net version>\Temporary ASP.NET Files\(ApplicationName)
C:\Windows\Microsoft.NET\Framework64\<.net version>\Temporary ASP.NET Files\(ApplicationName)
Upvotes: 9
Reputation: 3693
In my case, the .PDB file was hosed (from which the symbols are loaded) in VS 2012, so performing a Clean and Build reconstructed the .PDB file and everything started workign again.
Upvotes: 0
Reputation: 1767
I had this problem with SL5 project (VS2012). And to fix this, I was needed to set "Silverlight" option enabled in %MyProjectName%.Web
project properties, under Web
tab.
Upvotes: 0
Reputation: 139
Been messing with this problem for a couple hours trying everything above. I finally changed my Target Framework to .NET Framework4.5 and it all started magically working.
Upvotes: 3
Reputation: 8043
This is always weird. I just had this problem and solved it with a full rebuild of the entire solution.
There was also another strange symptom, though: a new unit test that I had written using NUnit, mocking with NSubstitute, wouldn't pass because NSubstitute wasn't returning what I wanted it to return. I lost a few minutes trying to figure out if I did something wrong programming NSubstitute, then when I tried to attach the debugger to the NUnit GUI I saw that warning.
That's when I decided to do a full rebuild of the solution, and that worked for me.
So I guess the lesson to be learned is "before smashing your head against the wall, try a full rebuild".
Upvotes: 1
Reputation: 24182
I am finding the same behavior from time to time when debugging silverlight. My solution is to clean the browser's cache (on latest IE click on the wheel button, Developer tools), as it sometimes will cache the binary files and not load the new ones.
Perhaps is could be the same with your views?
Upvotes: 7