Why is Chrome pausing on some line inside jQuery?
Asked Answered
C

8

52

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?

Cracking answered 2/3, 2011 at 23:49 Comment(2)
And would you like answers, or guesses? If you want answers it would probably be helpful to provide your jQuery code. And the number of the relevant line.Cytoplast
sorry David. I was posting the question and the answer so I was very short with my question description. I had just spent 4 hours banging my head against the wall until a co-worker showed me the pause icon in the lower left. I just wanted to document the solution in case someone else had the problem.Cracking
C
91

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

Cracking answered 2/3, 2011 at 23:50 Comment(2)
Thanks for posting the answer. Saved me banging my head for a bit.Aldis
How long have I lived with this "bug"? Arg.Lagomorph
M
15

I had been debugging and forgotten to remove a breakpoint.

Event Listener Breakpoints

Mancy answered 10/7, 2014 at 18:26 Comment(0)
B
6

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

Brisance answered 27/11, 2013 at 19:20 Comment(1)
I had it ticked which was causing the same problem for me. Got rid of that annoying paused in debugger message after unchecking it.Dru
L
1

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

Lumper answered 12/3, 2014 at 9:50 Comment(1)
So when it's grey like here, it's off? Sadly, the way tooltips are implemented is a mess, since non-toggles show what happens when you click, some devs code the tooltip to do the same (instead of showing the state which is more logical... I think :D)Gracie
D
1

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

Deuteranopia answered 17/10, 2019 at 10:41 Comment(0)
S
0

This can also cause the issue

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

enter image description here

Should not grey like this

enter image description here

Semidiurnal answered 10/2, 2015 at 18:37 Comment(0)
I
0

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.

Irrefragable answered 29/7, 2016 at 16:37 Comment(0)
D
0

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.

Donnie answered 19/10, 2019 at 16:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.