Dude! +100000000000000 Sent on the TELUS Mobility network with BlackBerry
-----Original Message----- From: Patrick Mueller <[email protected]> Date: Thu, 22 Mar 2012 17:17:01 To: callback-dev<[email protected]> Reply-To: [email protected] Subject: Re: landed [CB-280] Improve layout of cordova-js scripts One of the things you'll notice when you do a build in incubator-cordova-js, is that we build "debug" versions of all the platforms. This is intended as an aid for debugging. See [1] and [2] (the //@sourceurl bits, not the sourcemap bits). We don't need to ship these, but these might help you out if you want to, and can, debug for your platform. You'll see the individual files in the debugger instead of the big concatenated mess. The debug versions will also quickly show you what the components of the concatenated files are, since it's one module per line. Browserify makes use of the same trick. And, turns out, this helps out with debugging 'jake test' as well. Totally blew my mind, as I was getting some exceptions in there yesterday, but the stack traces were total crap [3]. I tried using the 'debug' version of the 'test' platform and - whoa - all the stack traces had real file names and line numbers! Turns out, internally, even v8 takes advantage of the //@sourceurl "pragma". I think I noticed the line numbers were one or two off; need to remove the extra \n chars in the modules we're generating, or something. Will fix later. [1] http://pmuellr.blogspot.com/2011/11/debugging-concatenated-javascript-files.html [2] http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/ [3] https://gist.github.com/2146664 -- Patrick Mueller http://muellerware.org
