Is it possible to somehow set a name for anonymous functions?
There is no need to add function names to the namespace for anonymous functions but I would like to avo
If dynamic function name is the issue. You can try this:
function renameFunction(name, fn) {
return (new Function("return function (call) { return function " + name +
" () { return call(this, arguments) }; };")())(Function.apply.bind(fn));
}
renameFunction('dynamicName',function() { debugger })();
source: Nate Ferrero