Working through some event routing right now and there's a lot of debugging steps.
I know about using "debugger" in the javascript and putting that after a conditional, and that is useful. I also know about right clicking a break point to add a test expression which is even better. However... I have no idea where this thing is going to take me and I am starting to wear out my function keys. Is there any way to add a breakpoint to a watch expression?
Basically the idea is this, within the enclosure scope, I want to check for a variable called "this.id". If this.id is the value I want, I enter the debugger.
Any ideas?
Thanks
Wanted to add that Didier's answer below solved my problem as they outlined in the article for decorating "Function". This will most likely be the path of least resistance for searching all functions for the value I want.
Function.prototype.debug = function(){
var fn = this;
return function(){
if (debugme) debugger;
return fn.apply(this, arguments);
};
};