调试器只在第一行停止(如果我在那里放置断点),但如果我在任何其他行放置一个断点,则不会停止。即使我在脚本中输入'debugger',它确实暂停并向我显示它在正确的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个特定文件中。即使我把它清空并加入一些简单的测试代码,它仍然是相同的。
答案 0 :(得分:2)
嗯。我删除了文件并再次创建它,现在调试再次正常工作