From 8a7d0f53d380e9ca93ee34d8ad05090d511e95c4 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sun, 6 Apr 2014 22:36:51 +0100 Subject: [PATCH] Add a sourceURL to the end of eval'd code This, miraculously, lets Chrome dev tools list tiddler modules in the script tag by their proper titles. Which lets you set breakpoints within them!!!!! https://chromedevtools.googlecode.com/svn-history/r421/trunk/tutorials/b reapoints/index.html#regular --- boot/boot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/boot.js b/boot/boot.js index 0be9aa274..3754ebf3d 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -397,7 +397,7 @@ $tw.utils.evalGlobal = function(code,context,filename) { // Compile the code into a function var fn; if($tw.browser) { - fn = window["eval"](code); + fn = window["eval"](code + "\n\n//# sourceURL=" + filename); } else { fn = vm.runInThisContext(code,filename); }