I can't get a breakpoint in a Razor view to be hit in Visual Studio 2013 while debugging in IIS Express.
This is the view and unreachable breakpoint:
Looking at the modules I see that the latest PDB file has been loaded:
And the folder
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\53ff8402\967c7053\assembly\dl3\f3c59a34\6698ffde_b452cf01
has the latest version of the DLL and PDF files:
ITVizion.VizionLogs.WeeklyLogs.Web.DLL
ITVizion.VizionLogs.WeeklyLogs.Web.PDB
I have already cleaned the solution, wiped the project's bin
folder, restarted Visual Studio, etc but it still won't hit the breakpoint.
What else can I try?
"No Symbols have been loaded for this document"Go to the Modules window (Debug > Windows > Modules) and check whether your module is loaded. If your module is loaded, check the Symbol Status column to see whether symbols have been loaded. If symbols aren't loaded, check the symbol status to diagnose the issue.
Ensure debug configuration, debug flag, and full debug information are set on all assemblies. Delete all bin and obj folders and all DLL files related to the project from my entire machine. Recreate projects causing the problem from scratch. Reboot.
To set a breakpoint in source code: Click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint. The breakpoint appears as a red dot in the left margin.
Can't believe it guys... wasted almost 1 hour on this. I was trying to debug the wrong view in the wrong path.
I set a breakpoint in this view:
C:\ITVizion\VizionLogs\ITVizion.VizionLogs.WeeklyLogs.Web\Views\Error\ServerError.cshtml
but actually I was trying to debug this view:
C:\ITVizion\VizionLogs\ITVizion.VizionLogs.WeeklyLogs.Web\Views\Shared\Error.cshtml
After I placed a breakpoint in the correct view, although it showed the message about the breakpoint would not be hit, the Debugger
actually hit the breakpoint during runtime! :D
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With