From:  Nick Fitzgerald <nfitzgerald@mozilla.com>
Date:  26 Aug 2015 07:37:44 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.js-sourcemap
Subject:  

Proposal for encoding source-level environment information

NNTP-Posting-Host:  63.245.214.181

Hi folks,

I'd like to embed some information about the source-level lexical
environment within the source map format, so that it can take its first
baby steps towards being a Real Debugging Format(tm).

This will enable:

1. Debuggers to rematerialize the source-level environment
​,
 scopes
​,​
and their bindings (regardless if there are corresponding scopes and
bindings in the generated JS).

2. Debuggers to locate a binding's current value. This includes situations
where:

  * The binding was renamed in the compiled JS. For example, the binding is
named
​`​
atom?
​`​
in the original source and renamed to
​`​
atom_question
​`​
in the compiled JavaScript. Or a minifier renames
​`​
getLatestFooWidget
​`​
to
​`
aF
​`​
.

  * The binding does not have a corresponding binding in the compiled
JavaScript. For example, the compiler inlined the binding's value after
recognizing that the binding was never mutated.

Here is the proposal, for your consideration:
https://github.com/fitzgen/source-map-rfc/blob/scopes-and-bindings/proposals/env.md

Feel free to discuss it on this list or on the source-map-rfc pull request:
https://github.com/source-map/source-map-rfc/pull/4

Cheers,

Nick