GNOME Bugzilla – Bug 654987
main: add logStackTrace(), for debugging
Last modified: 2011-07-20 19:46:52 UTC
I do this a lot... I imagine other people must too?
Created attachment 192328 [details] [review] main: add logStackTrace(), for debugging Add Main.logStackTrace(), to print a (javascript) stack trace, which is often useful when debugging.
Review of attachment 192328 [details] [review]: Yes, please! ::: js/ui/main.js @@ +498,3 @@ + log(msg + e.stack.substr(lf) + '\n'); + else + log(e.stack.substr(lf + 1) + '\n'); Clever, but maybe more obvious when written as: if (msg) log(msg); let lf = e.stack.indexOf('\n'); log(e.stack.substr(lf + 1) + '\n');
committed with less cleverness Attachment 192328 [details] pushed as 4405d99 - main: add logStackTrace(), for debugging