SourceMap on Firefox: source debugging for languages compiled to JavaScript
Join the DZone community and get the full member experience.
Join For FreeMore and more languages are compiled to JavaScript. Mozilla has plans to let you debug those languages in their source code (no need to look at JavaScript).
Examples of languages that are compiled to JavaScript:
- Google Web Toolkit (GWT): compiles Java to JavaScript which allows one to use Java on both server and client and to do web development with a great IDE (as in “Eclipse without plugins”).
- Minification [1]: tranforms a JavaScript program into a more compact version of itself without changing what it does. The measure taken here are: stripping out comments and newlines, using shorter variables names, etc.
- CoffeeScript [2]: is an improved version of JavaScript with a syntax for people who hate braces.
- Google Traceur [3]: compiles a variant of ECMAScript.next to JavaScript, on the fly.
- Exceptions report lines in the generated code, not in the original.
- Output in the console links back to generated code.
- You have to debug the generated code.
Related reading:
- What is the JavaScript equivalent of Java bytecode?
- Blog posts on CoffeeScript.
- Google’s Traceur: compile ECMAScript.next to JavaScript on the fly
Topics:
Opinions expressed by DZone contributors are their own.
Comments