Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular replacement for arguments.callee.caller

I want to see an Angular stack trace when a specific function is called twice, which seems odd but is the intended behavior https://github.com/angular/angular.js/issues/1146.

use strict disables arguments.callee.caller.toString() to print the call stack.

How can I log the caller of a named function in Angular?

like image 741
Dylan Valade Avatar asked May 02 '26 23:05

Dylan Valade


1 Answers

You can produce a stack trace by doing console.log((new Error).stack);

like image 114
Josh Avatar answered May 05 '26 11:05

Josh