Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 910
Josh Schultz Avatar asked Aug 19 '11 20:08

Josh Schultz


People also ask

How do I debug jquery in Chrome?

Step 1: Run your page in Google Chrome. Step 2: Press F12. Step 3: Click on the Sources tab. Step 4: In this example, I write debugger after the button click.

How do I disable JavaScript script in Chrome?

Open Chrome DevTools. Press Control+Shift+P or Command+Shift+P (Mac) to open the Command Menu. Start typing javascript , select Disable JavaScript, and then press Enter to run the command. JavaScript is now disabled.

How do I ignore debugger in Chrome?

Chrome. While debugging in the Developer Tools, right-click on a stack in the "Call Stack" window and select Add script to ignore list . Alternatively, you may open a file in the editor pane, right-click inside the file and select Add script to ignore list .


2 Answers

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.

like image 157
Nirmal Patel Avatar answered Oct 03 '22 10:10

Nirmal Patel


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.

like image 44
The_Black_Smurf Avatar answered Oct 03 '22 09:10

The_Black_Smurf