incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: landed [CB-280] Improve layout of cordova-js scripts
Date Thu, 22 Mar 2012 21:21:50 GMT

Sent on the TELUS Mobility network with BlackBerry

-----Original Message-----
From: Patrick Mueller <>
Date: Thu, 22 Mar 2012 17:17:01 
To: callback-dev<>
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

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


Patrick Mueller

View raw message