ASP.NET MVC Razor视图中的断点将不会被击中。没有为该文档加载任何符号 [英] Breakpoint in ASP.NET MVC Razor view will not be hit. No symbols have been loaded for this document
问题描述
在IIS Express中进行调试时,无法在Visual Studio 2013中的Razor视图中找到断点。
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:
查看模块,我看到已加载了最新的PDB文件:
Looking at the modules I see that the latest PDB file has been loaded:
和文件夹
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\53ff8402\967c7053\assembly\dl3\f3c59a34\6698ffde_b452cf01
具有DLL和PDF文件的最新版本:
has the latest version of the DLL and PDF files:
ITVizion.VizionLogs.WeeklyLogs.Web.DLL
ITVizion.VizionLogs.WeeklyLogs.Web.PDB
我已经清理了解决方案,擦除了项目的 bin
文件夹,重新启动了视觉工作室,等等,但仍然无法达到断点。
I have already cleaned the solution, wiped the project's bin
folder, restarted Visual Studio, etc but it still won't hit the breakpoint.
我还能尝试什么?
推荐答案
不敢相信……在此上浪费了将近1个小时。我试图在错误的路径中调试错误的视图。
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
我在正确的视图中放置了一个断点后,尽管它显示了不会打断该断点的消息,但 Debugger
实际上击中了该断点在运行期间! :D
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
这篇关于ASP.NET MVC Razor视图中的断点将不会被击中。没有为该文档加载任何符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!