I want to find out the caller function of a particular function in my angular2/ionic2 project.. No luck with
arguments.callee.caller.toString()
Any idea?
I know this is a bit late, but I just had the same problem and hopefully this will help someone else.
You can produce a stack trace by doing
console.log((new Error).stack);
That will show you which function called your particular function
You can simply check Call Stack in your browser dev tools. Take for example Chrome Dev Tools Stack Trace
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With