Green

Wednesday, November 13, 2013

a tracelog that bridges across setTimeout(), setInterval(), callbacks, recursive functions - done

My javascript framework does a lot of things asynchronously, and is designed to process at the same time multiple user requests for calculations on sometimes large datasets (delivered always in JSON in my case).


I was facing the problem (time and time again) that I could not keep track of which "userAction" (page load, click somewhere, hover over something, etc) was responsible for any given still-buggy function's execution in the debugger, due to the fact that "the default javascript engine configuration" (on all browsers) just drops or corrupts the call stack information (yes, even the one in arguments.callee.caller[recursive]).

Took me a while, but the solution in the end is ridicilously simple fortunately.


View the original article here

0 comments:

Post a Comment