by CookWithMe · 12y ago · 0 comments
Anyway, for future reference, you may want to learn how to use the JS debugger (both Chrome and Firefox are quite good). You could have set a break/watchpoint on the variable 'foo'. Once it has changed, you can inspect the stack and would have found that the set('bar', ...) method was involved. Should be much quicker than printf-debugging...
Your debugger should be able to display the corresponding .js file for each line in the call stack. Jump down the stack until you find your code.
Yes, it doesn't solve the problem (wanna talk about debugging freaking JSP or TinyMCE plugins? :p) but you won't
> spent the better part of a day trying to track down the source of this problem.
We are actually working close with the firefox and chrome teams, to drastically improved general JavaScript developer ergonomics when debugging.