Permalink
Browse files

Clicking on errors outputs the stack, and also all clicked vars are p…

…ut on the window object for manual inspection
  • Loading branch information...
spadgos committed Mar 2, 2012
1 parent 0c414ae commit 2c6bfeba4d2e1f40ff805695dc37c691b1ffbca3
Showing with 8 additions and 0 deletions.
  1. +8 −0 renderers/html.js
View
@@ -121,6 +121,14 @@ Tyrtle.setRenderer(new (function () {
log = (window.console.dir || window.console.log);
}
log.call(window.console, v);
+
+ // if it's an error, output the stack.
+ if (v && v.stack) {
+ window.console.log(v.stack);
+ }
+
+ // give global access to the file so that it can be inspected manually.
+ window.loggedVar = v;
});
}
} else {

0 comments on commit 2c6bfeb

Please sign in to comment.