Skip to content

Source Maps

Chad Killingsworth edited this page Jan 13, 2016 · 10 revisions

Source Map documentation

Closure Compiler can produce source maps to aid in debugging. These are created when the --create_source_map flag is used. While the compiler also has the --souce_map_input flag which allows the compilation to be aware of previous transformations. However, input source maps are only utilized to display error messages and do not affect the output source map.

To obtain a full composed source map, 3rd party tools must be used. The gulp plugin automatically creates fully composed source maps since that is standard behavior in that build tool.

Notes regarding source map generation and consumption.

Design docs here:

Source Map v3

Design docs for deprecated versions:

Source Map v2

Source Map v1

Implementation here:

com.google.debugging.sourcemap

Mozilla's JS Implementation here:

https://github.com/mozilla/source-map

Webkit JS Implementation here:

http://trac.webkit.org/browser/trunk/Source/WebInspectorUI/UserInterface/Models/SourceMap.js#L158

Blink JS Implementation here:

https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js&type=cs&l=282

Discussions:

[email protected]

Chrome's support of Source Maps discussed:

http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/

A SourceMap encoding/decoding debugger: http://murzwin.com/base64vlq.html

Clone this wiki locally