Hi
I am having a problem understanding which function runs (probably in infinite loop) in my JS code.
Is there a plug\way to see the list of the setTimeout functions that are running?
thank you
Hi
I am having a problem understanding which function runs (probably in infinite loop) in my JS code.
Is there a plug\way to see the list of the setTimeout functions that are running?
thank you
You can probably use the Firebug Firefox extension to put a breakpoint in. http://getfirebug.com/
All you have to do is hook into your setTimeout
function and log stuff:
var _temp = setTimeout;
setTimeout = function() {
_temp.apply(this, arguments);
alert(arguments[0]);
};
Put that snippet at the top of your code. Every time anything invokes setTimeout
, you'll see exactly who's doing it.
Also, instead of alert
, use console.log
or something similar.