Why is Chrome pausing on some line inside jQuery?

2020-02-08 04:56发布

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?

8条回答
做个烂人
2楼-- · 2020-02-08 05:16

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

查看更多
我想做一个坏孩纸
3楼-- · 2020-02-08 05:18

for me this was the problem: enter image description here 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.

查看更多
Viruses.
4楼-- · 2020-02-08 05:24

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

查看更多
太酷不给撩
5楼-- · 2020-02-08 05:27

To disable this on On Windows for Chrome.

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

enter image description here

查看更多
叼着烟拽天下
6楼-- · 2020-02-08 05:30

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

查看更多
beautiful°
7楼-- · 2020-02-08 05:32

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.

查看更多
登录 后发表回答