I have the functions
function getCallingFunctionName() {
alert(arguments.callee.caller.name.toString();
}
var bob = function() {
...
getCallingFunctionName();
}
When the code is run the value alerted is an empty string is returned. I need to return
bob
I CANNOT change the original functions (im dealing with a large project with thousands of functions etc.
var bob = function bob() {
...
getCallingFunctionName();
}
Any one got any other ideas ? Its not critical to have but basically to help with debugging.