your example, "var f = function(){ ... }", is not an anonymous function.
to get function names just add a function name when utilizing inline functions.
http://jsfiddle.net/6AXfV/
e.x:
(function super_puper() { throw new Error(); })();
results in:
Uncaught Error (index):23
super_puper (index):23
window.onload