Update 2011-09-16: Source maps are coming to WebKit, too. Mozilla and WebKit implementers might even agree on a common format.
There are several problems with using these languages:
- 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.
That is why Mozilla’s new project “SourceMap
” is exciting: For all generated code, it keeps a map from input source locations to generated source locations. It uses that map to report errors using the input line numbers and to link to the input source from the console. Support for working with a debugger in the input language will come later (see “Next Steps & Open Issues”).
- Blog posts on CoffeeScript.