While development Im often get the problem, that I don't know what the actual context of a some function-calls are.
For example in an app where Im using an special SDK (e.g. facebook.sdk) Im running often in a situation where im writing the handle scripts and passing some function-calls as a parameter for callback reasons or something.
One Example:
FB.getLoginStatus(function(response) {
this.statusChangeCallback(response);
});
...
statusChangeCallback: function(response) {
...
Now, Im wondering, why the browser throws me errors like "this.statusChangeCallback is not a function". But as you can see in the example Im defined the function. So I know: The scope/context where js calles the function like a callback is a complete different than this code (somewhere in the sdk scripts).
Is there some way to get info about the place or the stack-trace or something. I mean some better way to comprehend the way, where the functions are called (better than just the script info within the browsers console output which is not very revealing in the manner of summarized js-files for example
).
There must be good debugging-tools out there.