【问题标题】:Chrome debugger only stopping at first lineChrome 调试器仅在第一行停止
【发布时间】:2013-09-04 12:33:24
【问题描述】:

调试器只在第一行停止(如果我在那里设置断点),但如果我在任何其他行设置断点,它不会停止。即使我在脚本中键入“调试器”,它确实会暂停并向我显示它在正确的 javascript 文件中暂停,但它显示第一行是活动的执行行。

var someVar = 0; //<-- does stop here when I put a break point here

$(document).ready(function()
{
    debugger; //<-- makes it stop but shows the first line as the active line
    alert('here!'); //<-- does not stop with a breakpoint here, but does execute the code
});

我尝试重新启动 chrome,并在 Canary 中进行了尝试,令我惊讶的是,它显示了完全相同的行为。此外,此行为仅发生在 1 个特定文件中。即使我清空它并放入一些简单的测试代码,它仍然是一样的。

【问题讨论】:

    标签: javascript debugging google-chrome google-chrome-devtools breakpoints


    【解决方案1】:

    嗯。我删除了文件并重新创建了它,现在调试又可以正常工作了

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-02
      • 2018-05-16
      • 2012-07-16
      • 1970-01-01
      • 1970-01-01
      • 2013-11-06
      相关资源
      最近更新 更多