Skip to content Skip to sidebar Skip to footer

Can I "step Over" Just Jquery Code While Debugging?

While stepping through a script that uses jQuery, I just want to test the code I wrote. I don't want to step into the jQuery file -- I'm not debugging jQuery, just my own file. Ar

Solution 1:

Yes you can

At least in FireFox (25+) and Chrome (30+).

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:

Nick Fitzgerald and Chris Heilmann: "New Features of Firefox Developer Tools: Episode 25"

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:

Collin Miller: "Tips and Tricks: Ignoring library code while debugging in Chrome"

I'm using it in Chrome right now. It works like a charm and saves me so much time.

Solution 2:

Pretty sure the answer is "no, this feature does not exist".

What's your motivation here, though? It looks to me like setting a breakpoint on Line 2 and creating a watch for the "resultset" of Line 1 whilst you're there will get you what you're likely to want.

Solution 3:

F10 should step over the function calls, F11 should step into the function calls. This works in VS as well as firebug.

Solution 4:

At least Firebug's JavaScript debugger has an option to "step over" which still does not descend into function calls.

However, you will have to choose between "step (into)" and "step over" manually depending on what kind of function is being called.

Solution 5:

The answer is rather simple, you just have to refactor the function out. I can't recall

$("div").each(function() {
   doThis(this);
});

functiondoThis(object) {
   $(this).hide();
}

Will almost certainly work with a halfway decent debugger.

Post a Comment for "Can I "step Over" Just Jquery Code While Debugging?"