Can I tell the Chrome script debugger to ignore jquery.js?

JavascriptGoogle Chrome-Devtools

Javascript Problem Overview


Is there a way to tell the Chrome debugger (or maybe Firebug?) to not break within certain files? To assume they're not broken, essentially? This seems like something they might build in.

Javascript Solutions


Solution 1 - Javascript

Blackboxing JS files is now possible in Firefox https://developer.mozilla.org/en-US/docs/Tools/Debugger

And in Chrome Canary using Experimental Dev tools. http://www.divshot.com/blog/tips-and-tricks/ignoring-library-code-while-debugging-in-chrome/

Update. In Chrome v.75 there is a separabe tab for blackboxing.

Above works in stable Chrome build as well now.

Solution 2 - Javascript

The latest version of Chrome has implemented a new blackbox feature that does exactly what you are looking for. Basically, when you set the blackbox option on a given file, it will prevent Chrome debugger from breaking into that file.

This feature is built-in and it can be set with the context menu of the file (right click). It will also work if Chrome debugger is set for stopping on all exceptions.

Solution 3 - Javascript

If the issue you're having is that the Chrome debugger is stopping on all exceptions, even the ones inside of jQuery, then you may need to tell Chrome to only pause on uncaught exceptions, not all exceptions. When in the Script panel in the debugger, there is an icon in the lower left corner of the window that controls this.

Solution 4 - Javascript

In Chrome, open Developer Tools, then goto Settings, and you will see the Blackbox tab:

Chrome Blackbox

In FireFox it's even easier, just click the Eye at the bottom of the file:

FireFox Blackbox

Solution 5 - Javascript

  1. Go to developer tools setting and click on Balckboxing tab on the left panel.
  2. Then click on the Add pattern button and type jquery.js
  3. Close and reopen developer tools, now its skipped!

Solution 6 - Javascript

If the debugger is blowing up somewhere in the jQuery files, you could potentially wrap the suspect calls in a try/catch and then throw an error in your own catch. That way, you can isolate exactly where your're going wrong.

I would be more inclined to do stack traces to see why my code is blowing up, e.g. invalid JSON, than to try gloss over it.

Solution 7 - Javascript

You can follow this link to ignore the pattern in latest chrome browser (mine is : Version 100.0.4896.60 (Official Build)).

https://dilshankelsen.com/ignore-library-code-while-debugging-browser/

Developer Tools > Settings (Cog Icon) > Ignore List. Then add a file name or regex pattern you wish to exclude.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJosh SchultzView Question on Stackoverflow
Solution 1 - JavascriptNirmal PatelView Answer on Stackoverflow
Solution 2 - JavascriptThe_Black_SmurfView Answer on Stackoverflow
Solution 3 - Javascriptjfriend00View Answer on Stackoverflow
Solution 4 - JavascriptsMylesView Answer on Stackoverflow
Solution 5 - JavascriptMahmoodView Answer on Stackoverflow
Solution 6 - JavascriptKelly SuttonView Answer on Stackoverflow
Solution 7 - Javascriptuser2679476View Answer on Stackoverflow