简体   繁体   English

我无法在剃刀视图中设置断点

[英]I can't set breakpoint in razor view

I know it's possible to set breakpoints in a MVC Razor view but something got wrong and it's not working anymore..我知道可以在 MVC Razor 视图中设置断点,但是出了点问题,它不再工作了..

I tried to restart visual studio 2013 and to change some options of Debugging.我尝试重新启动 Visual Studio 2013 并更改调试的一些选项。 Have you got any suggestion?你有什么建议吗?

Thanks to Vladimirs I could find a solution. 感谢弗拉基米尔,我可以找到解决方案。

I had to Clean and Rebuild the whole solution. 我不得不清理并重建整个解决方案。 I tried a simple rebuild before but it didn't worked. 我之前尝试过一次简单的重建,但没有奏效。

而不是在 Visual Studio 中设置断点,而是在你的 razor 页面中编写这行代码:

@System.Diagnostic.Debugger.Break()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从 mvc 日期选择器中删除时间并在剃刀视图中设置默认值? - How can I remove time from a mvc datepicker and set a default value in a razor view? 无法在.aspx文件中设置断点(后面没有代码) - Can't set breakpoint in .aspx file (no code behind) 我无法在 C# 中使用 Jquery 和 Ajax 从控制器向 Razor 视图发送值 - I can't send a value to a Razor View from controller using Jquery and Ajax in C# 如果在Visual Studio和C#中,我可以在内联中设置断点吗? - Can I set a breakpoint in an inline if in Visual Studio and C#? 在这种情况下,如何设置断点以获得异步结果? - how can I set a breakpoint to get the async result in this scenario? 如何在剃刀视图中使用数据库视图? - How can I use a view of my database in a razor view? 无法在Razor的部分视图中使用脚本渲染部分 - Can't render section with script in a partial view in Razor 我如何在Razor的部分视图中获取HTMLPREFIX - How can I get HTMLPREFIX inside the partial view i Razor 我如何发现 CSS 在 Razor 视图(模型)中不起作用的原因? - How can I spot why the CSS not working in Razor View (model)? 如何在带有下拉菜单的Razor视图中过滤数据 - How can I filter data in a Razor view with a dropdown
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM