Thursday, March 7, 2013

Source Maps in Coffeescript 1.6.1

Source Maps in Coffeescript 1.6.1

As a follow up to my previous post on the subject, I'm pleased to let my readers know that source maps are now available in Coffeescript 1.6.1 and up.

This is a big step forward in debugging for Coffeescript.   To create a source map along with your compiled javascript, simply use the --map or -m option when compiling.   Currently,  Chrome and nightly WebKit builds are the only browsers to support source maps.  To enanble source maps, open the developer tools in Chrome and click on the gear icon in the lower right corner, this will give you the settings dialog.  In settings set "Enable Source Maps" to on(checked).

Source maps are also available for Node.js.  For more information on Node source maps please see this post.

For more infomation on source maps, see this HTML5 Rocks tutorial.

No comments:

Post a Comment