I am (pretty) sure that this is not possible.
Even the Chrome debugger doesn't track your area all the time, but only when it hits a breakpoint. Keeping track of the chain of areas at all times will cost too much memory (depending on the complexity of your closures and contexts). See this query for more information: https://groups.google.com/forum/#!topic/google-chrome-developer-tools/wKEMpKjXR7s
ECMA 262 (10.3.1) describes how identifier resolution should be performed, the most important part of this is calling GetIdentifierReference (lex, name, strict) , which is described in ECMA 262 (10.2.1) . As far as I know, in any ECMAScript implementation there is no command to call this function at runtime.
However, this question (or, more precisely, the answer) may be interesting, since it is at least closer to what you asked.
source share