Why is Chrome pausing on some line inside jQuery?

家住魔仙堡 提交于 2019-12-17 22:37:32

问题


Every time I refresh my web app with the Chrome Inspector open it pauses and takes me to the sources tab with a big red arrow icon pointing to some weird line inside jQuery.

I see

Paused in debugger

in the top-middle of the window, and

Paused on exception: DOMException

in the Call Stack on the sources tab.

As far as I'm aware, I haven't set any breakpoints and this code wasn't throwing exceptions before - so what's going on?


回答1:


That little pause icon in the lower left. Should be black in color. Click it to cycle through several breakpoint options.




回答2:


I had been debugging and forgotten to remove a breakpoint.




回答3:


Also check that you haven't ticked "Any XHR" under XHR Breakpoints.




回答4:


To disable this on On Windows for Chrome.

In "Script" button circled in red below, cycle to same state ("Don't pause on Exceptions")




回答5:


This can also cause the issue

Break Point icon at top left should be blue like this(For Deactivate BreakPoints)

Should not grey like this




回答6:


I was able to clear a phantom breakpoint I had while using Chrome by closing developer tools, refreshing the page, and then opening developer tools.




回答7:


Solution for Visual Studio debugging

I had the same problem with the "Paused in debugger" showing up when I was building a website with MVC 5 and razor.

What solved the problem for me was to:

  1. Remove all breakpoints in the code (some were set in JavaScript code).

  2. Start debugging the project, click the "Exception settings" tab, and deselected "JavaScript (Chrome) Exceptions" checkbox.

  3. Stop debugging - Settings will apply first after a restart

  4. Start debugging - no more "Paused in debugger"

Somewhere along the line, I must have checked the "JavaScript (Chrome) Exceptions" checkbox, and forgot about it.

Link to Exception Settings Image




回答8:


for me this was the problem: I had to uncheck the any XHR or fetch checkbox

Conclusion: I don't know if you if this will fix the problem but I guess that if you have any checkbox checked in any tab that has Breakpoints in its name just uncheck it and see if it works, and uncheck breakpoint symbol in the top left bar till it's grey, and then you will need to hit the pause or play button in the top left bar and nothing should appear any more.



来源:https://stackoverflow.com/questions/5174968/why-is-chrome-pausing-on-some-line-inside-jquery

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!