The debugger's "Variables" view could display a "smart" scope with all the variables actually used in a lexical scope. — WebStorm feature request — Has it shipped?