我刚刚安装了Visual Studio 2017.启动ASP.NET MVC应用程序后,我收到一条消息,指出已在Visual Studio中启用chrome调试。
但是我在Visual Studio中的断点不会出现。Razor代码上的断点似乎可以正常工作,但Javascript无法运行。断点并不像应该的那样完全红色。重新启动,重建似乎没有任何效果。
我有以下代码示例
@Html.Partial("_Test", Model.Test) // debugging works here
<script>
var i = 1;
console.log(i); // debugging does not work here or above
</script>
@section scripts {
<script>
var a = 11;
console.log(a); // debugging does not work here or above
</script>
}
我没有打开chrome调试控制台,而是在Visual Studio中选中了已启用的选项(“启用Java脚本调试..”)。
根据这篇博客文章,我认为这应该可行:https : //blogs.msdn.microsoft.com/webdev/2016/11/21/client-side-debugging-of-asp-net-projects-in-google-chrome /
我在这里想念什么吗?难道这在某种程度上不能在Visual Studio 2017中工作?
我只有一个扩展名,那就是Resharper,但是我想这不是问题。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句