From:  "Fitzgerald, Nick" <>
Date:  15 Mar 2014 04:33:16 Hong Kong Time

Re: Source maps in ES7?


On 3/13/14 9:49 PM, John Lenz wrote:
> Two things:
> I'm very interested in prior art in this area.  This isn't a new
> problem we are trying to solve.

Totally agreed.

One of the reasons I tried to instill the importance of an extensible
architecture is from what I've learned about DWARF and talking with Jim
Blandy (who was on the DWARF committee). DWARF is built upon Debugging
Information Entries which are basically arbitrary debugging annotations
that can be skipped over by debuggers that are unfamiliar with the
specific annotation. Furthermore, this allows compilers to progressively
add more debugging information and debuggers can start taking advantage
of new annotations as they start appearing.

> The original source map deliberately ignore these features to all
> multiple levels of translation and at a mid level there might not be a
> JS AST representation to hook on to.

This is a very good point, and is something I overlooked in my proposal.

I'm not married to my proposal and the AST format. I do think that we
*must* solve the requirements I outlined in the blog post for any debug
format of the web that was to be properly standardized.

I also feel very strongly that every compile-to-js language shouldn't
have to write its own browser devtools extension for each browser that
they want to debug.