Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Skip Javascript Framework while Debugging in Chrome

I did research and found this website give my very useful information https://divshot.com/blog/tips-and-tricks/ignoring-library-code-while-debugging-in-chrome/

I did enable blackbox mode for the file pattern as following

(firebug|angular|knockout|jquery|bootstrap|modernizr|respond)

However, if i click the pause button in developer tools and when the mouse is over a page, the script still stop at jquery.min.js with the yellow box showing like the picture.

enter image description here

I just want to debug which function is performed when i did some action like, Click particular button etc.

But the jquery.min.js stop me from knowing this. Do you have any idea how to workaround or to make debugging more easier?

Thank you very much.

like image 627
chaintng Avatar asked Nov 25 '14 07:11

chaintng


People also ask

How do I skip the 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 .

How do I debug JavaScript errors in Chrome?

Press the F12 function key in the Chrome browser to launch the JavaScript debugger and then click "Scripts". Choose the JavaScript file on top and place the breakpoint to the debugger for the JavaScript code.

How do I edit JavaScript debugger in Chrome?

Editing JavaScript code in real-time is possible in Chrome and Chromium based browsers. After loading a web page completely, press the F12 key to open the developer tools, then open the 'Sources' tab. Now open any Javascript file loaded on the browser and you can directly edit it by clicking anywhere in that file.


1 Answers

You need to enter in one library at a time if you are going to do them like that. Read the docs on blackboxing for more info https://developer.chrome.com/devtools/docs/blackboxing

You can:

  • enter the name of a file,
  • use regular expressions to target:
    • files that contain a specific name /backbone.js$,
    • certain types of files like .min.js$
  • or enter in an entire folder that contains scripts you want to blackbox such as bower_components.

To my knowledge you cannot enter a regex like (thing1|thing2|thing3|etc). That will not work.

Here's a screenshot of what you can do though.

enter image description here

like image 109
jaredwilli Avatar answered Sep 25 '22 21:09

jaredwilli