08 2 / 2013
To use it, you just require the source-map-support module from npm, and like magic all of your stack traces will now contain correct line numbers. It uses V8’s handy Stack Trace API to capture errors and rewrite their stack traces just before they are thrown and printed out if not caught. It also uses Mozilla’s source-map module to do the actual source map parsing and mapping. That module can also be used for source map generation, and CoffeeScriptRedux does just that.
Anyway, if you have been itching for source map support in Node.js like I have, go check out source-map-support on Github and npm, and start debugging better. Source maps can solve 90% of the issues people have had with compile to JS languages, so I’m glad to see them arriving in both the browser as well as Node.js.