When debugging JavaScript code using Chrome Developer Tools the debugger pauses on code where breakpoints are not set. I don't have the Pause on exceptions
feature enabled, and there definitely are not breakpoints set (see attached image).
使用Chrome开发者工具调试JavaScript代码时,调试器会暂停未设置断点的代码。我没有启用Pause on exceptions功能,并且肯定没有设置断点(参见附图)。
I asked a similar question before which was helpful but didn't quite solve this issue (previously I had the Pause on exceptions
enabled). In the example below I swapped out the minified version of kendo.all.min.js
for the unminified version, which allows me to see where the script execution is being paused, but I don't know why it is being paused. This happens a lot with jquery.min.js
too.
我问了一个类似的问题,之前有用,但没有完全解决这个问题(之前我启用了Pause on exceptions)。在下面的示例中,我为未公开的版本换出了缩小版本的kendo.all.min.js,这允许我查看脚本执行暂停的位置,但我不知道为什么它被暂停。这也发生在jquery.min.js上。
1 个解决方案
#1
I fixed my breakpoints problem by clicking the "Restore defaults and reload" button located in the “Settings” section. (If needed) to find the button: In Developer Tools click the top right three vertical dots and select “Settings F1”; the button “Restore defaults and reload” is at the bottom right.
Also note that it really restores defaults - you lose all previously saved breakpoints and any files you have open in Developer Tools will be closed.
I got this solution from: Chrome javascript debugger breakpoints don't do anything?
我通过单击“设置”部分中的“恢复默认值并重新加载”按钮修复了断点问题。 (如果需要)找到按钮:在开发人员工具中单击右上角的三个垂直点并选择“设置F1”; “恢复默认值和重新加载”按钮位于右下角。另请注意,它确实恢复了默认值 - 您丢失了以前保存的所有断点,并且您在Developer Tools中打开的所有文件都将被关闭。我得到了这个解决方案:Chrome javascript调试器断点什么都不做?
#1
I fixed my breakpoints problem by clicking the "Restore defaults and reload" button located in the “Settings” section. (If needed) to find the button: In Developer Tools click the top right three vertical dots and select “Settings F1”; the button “Restore defaults and reload” is at the bottom right.
Also note that it really restores defaults - you lose all previously saved breakpoints and any files you have open in Developer Tools will be closed.
I got this solution from: Chrome javascript debugger breakpoints don't do anything?
我通过单击“设置”部分中的“恢复默认值并重新加载”按钮修复了断点问题。 (如果需要)找到按钮:在开发人员工具中单击右上角的三个垂直点并选择“设置F1”; “恢复默认值和重新加载”按钮位于右下角。另请注意,它确实恢复了默认值 - 您丢失了以前保存的所有断点,并且您在Developer Tools中打开的所有文件都将被关闭。我得到了这个解决方案:Chrome javascript调试器断点什么都不做?