Javascript exception stack trace

Place this line where you want to print the stack trace:

console.log(new Error().stack);

Note: tested by me on Chrome 24 and Firefox 18

May be worth taking a look at this tool as well.

Leave a Comment