Source maps (was: Multiline Strings)
Nick Fitzgerald
fitzgen at gmail.com
Wed Mar 12 14:00:06 PDT 2014
> 4) Browsers are still all over the place in how they report Error stack trace information.
We (Firefox Developer Tools) purposefully don't expose source mapped
stacks to the web because it would require adding some kind of API to
know when source maps are done being fetched or blocking(!) on
Error.prototype.stack until the source map is fetched. We also avoid
fetching source maps unless the debugger is open, so this would expose
to the web if the debugger is open. Furthermore, we wouldn't want to
only have the source mapped stack, you would also want the plain JS
stack if you think that the source map could be bogus or if you are
debugging the source maps you are generating as a tool author. This
would further complicate the stack string.
> 1) There is not yet a standard for sourcemaps. But see <https://docs.google.com/a/google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k>,
> <https://developers.google.com/chrome-developer-tools/docs/javascript-debugging#source-maps>,
> and <https://github.com/mozilla/source-map/>. Would someone care to champion this for inclusion
> in ES7?
If a debug format for targeting JavaScript were to be standardized, it
should do more than simply file/line/column translation. My thoughts
on this subject outgrew an email reply, so I have collected them here:
http://fitzgeraldnick.com/weblog/55/
_Nick_
More information about the es-discuss
mailing list