javascript - 调试在 javaScript 代码中不起作用,在 asp .net MVC4 应用程序中

标签 javascript asp.net-mvc-4 debugging visual-studio-debugging script-debugging

我在 asp .net MVC4 中构建应用程序,在调试 javaScript 代码时遇到问题,我在我的断点上发现了这个错误,

“当前不会命中断点。没有为该文档加载任何符号。”

但在 Controller 类中调试对我来说工作正常。

如果您知道解决方案,请帮个忙。

最佳答案

将语句debugger; 放入要添加断点的javascript 文件的代码中。类似的东西,

function addValue(){
  var a = 10;
  var b = 20;
  debugger; // <= here will be added break point 
            //when you access your page in browser 
  var result = a+b;
  return debugger;
}

更多关于 debugger

关于javascript - 调试在 javaScript 代码中不起作用,在 asp .net MVC4 应用程序中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22765465/

相关文章:

c# - ASP.NET MVC、Unity 和 IDisposable

c# - ASP NET MVC 4 : How to return a file from a controller to view with angularJs?

javascript - paperjs:剪辑两条路径

Javascript 在文本框中输入值时 trim 空格

c# - MVC4 捆绑 : where the URL for bundle is held

Xcode调试-显示图像

asp.net - web.config - 自动生成发布版本

go - vscode Golang调试launch.json配置

javascript - Angular js 中的模块错误

javascript - Firestore 中存储的 Date 对象的行为将会改变,您的应用可能会崩溃