Search code examples
javascriptdebuggingloggingtracecontrol-flow

Live javascript debugging by recording function calls and parameters


Is there a debugging system that allows me to record javascript function calls and their parameters as they occur? this would allow me to trace and debug applications in live/client situations without the performance hit due to manual logging.

Edit: I'm not talking about manually calling functions using a 'console' window and viewing the results, or manually adding 'trace' or 'log' commands into my javascript. I need it to work with any running javascript.


Solution

  • Can you override Function.prototype.call and retrieve arguments and arguments.callee?

    This would have the effect of reporting on ALL functions and therefore being super verbose, but maybe you'd want to filter.

    Then you have the question of how you want to report, perhaps with if (console) console.log