Function call: I'm looking to implement an strace like functionality in javascript. That is, I'd like to log all function calls and potentially its arguments, in the order of function calls. Note that I'd like to do this in a stand alone js interpreter / headless browser, so browser plugins isn't going to help.
Attribute access: Also, is there a way to log every attribute access?
I imagine there may be a way to monkey patch Object functions at the time of attribute access and function invocation? If now, may be do something with javascript engine?
Update: https://stackoverflow.com/a/23103992/1179293 seems to answer #1, with known limitations. Attribute access (#2) still remains unanswered