Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Source Maps for CoffeeScript

DZone's Guide to

Source Maps for CoffeeScript

· Web Dev Zone
Free Resource

Discover how to focus on operators for Reactive Programming and how they are essential to react to data in your application.  Brought to you in partnership with Wakanda

One of the more serious  concerns about CoffeeScript is that it lacks a first-class debugging environment. The code that you see in a browser debugger is the compiled JavaScript, not the CoffeeScript source. Thanks to JavaScript Source Maps, however, this long-running issue will likely be solved in the very near future.

JavaScript Source Maps is a system of references from JavaScript executing in the browser to original source files that have been minified, concatenated, compiled, or otherwise transformed. Chrome dev tools evangelist  Paul Irish called Source Maps "the biggest thing to happen to JavaScript debugging in years." The Google Chrome team is pushing aggressively toward the release of Source Maps support (you can preview the feature in Chrome Canary).

You can read more about Source Maps in  MozillaWiki feature page, in  this tutorial, and in the formal proposal co-authored by Mozilla and Google. There is a Source map support plan discussion on the CoffeeScript Google Group.

Finally, Mozilla intern Nick Fitzgerald has produced a great  what-I-did-this-summer video explaining the importance of Source Maps and of languages such as CoffeeScript. I recommend watching all 15 minutes of it, but for the TL;DR crowd, start around minute 11 for the sequence in which he demos an actual JavaScript console error with a link back to CoffeeScript source. Woo Hoo!

Learn how divergent branches can appear in your repository and how to better understand why they are called “branches".  Brought to you in partnership with Wakanda

Topics:

Published at DZone with permission of Chris Smith, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}