Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ignore certain script files / lines when debugging?

I'm trying to debug some JavaScript, I want to find out what code gets executed when I hover over a certain div element (I've got no idea which bit of code, because there's no direct 'onmouseover' - I think there's a jQuery selector in place somewhere?).

Usually I'd use the "Break All" / "Break On Next" facility provided by Developer Tools / Firebug, but my problem is that other code (tickers, mouse movement listeners etc.) immediately gets caught instead.

What I'd like to do is tell the debugger to ignore certain JavaScript files or individual lines, so that it won't stop on code I'm not interested in or have ruled out. Is there any way to achieve that in IE (spit, spit!) - or could you suggest a better approach?

like image 964
Michael Avatar asked Jun 02 '11 10:06

Michael


People also ask

How do I stop debugging inspect?

Go to the "Sources" tab. At the top right hand side, toggle the button that looks like the pause symbol surrounded by a hexagon (button on the far right) until the color of the circle turns black to turn it off. If the pause symbol isn't blue it may be that you've accidentally marked a line for debugging inspection.

What does step over do in JavaScript?

(Step Over) — This instructs the debugger to proceed until the next line of code, but if it encounters a new function, to “step over” it by executing it all in one step.


2 Answers

In FireFox this feature is called "Black boxing" and will be available with FireFox 25. It let's do exactly what you where looking for.

This feature was also introduced to Chrome (v30+) although it's tougher to find/configure. It's called "skip through sources with particular names" and Collin Miller did an excellent job in describing how to configure it.

Normally I'm for putting answers and howtos here instead of links but it would just end in me copying Collin's post.

like image 97
flu Avatar answered Sep 29 '22 14:09

flu


Looks like you're looking for Visual Event.

like image 36
pawlik Avatar answered Sep 29 '22 14:09

pawlik