Getting scope of function caller
问题 I have a function that breaks somewhere in Line 1433 of ExtJS. var createDelayed = function(h, o, scope){ console.log(arguments); //logs undefined all round. return function(){ var args = Array.prototype.slice.call(arguments, 0); setTimeout(function(){ h.apply(scope, args); }, o.delay || 10); }; }; Is there any way to see what line a function is executed from, from within itself? (since it's a third party lib, and I cant really do var me =this; and log me ) 回答1: There is arguments.callee