During some tries with the debugger in javascript (Node.js), I surprised that VSCode call "Closure" objects that are not an "Abstract Closure" (in terms of https://tc39.es/ecma262/#sec-abstract-closure). I'm wondering why VSCode debugger shows to me that name.
If I understood correctly from the ecma, that are the lexical scope not the closure itself.
function outer () {
const a = "some text";
function middle() {
const b = "other text"
return function inner() {
console.log(a, b)
}
}
const x = middle()
return x // line where the debugger says "Closure"
}
const c = outer();
c()

The section you've linked to isn't defining the term "closure" in its general sense, it's defining the specification term "Abstract Closure:"
That's a closure, but not the only kind that can exist, and it's just a mechanism for explaining things in the specification.
VS Code is using the term "closure," not Abstract Closure. All functions in JavaScript are closures: Whenever a function is created, it gets a link to the environment record that the function closed over (the link is called
[[Environment]]in the spec). When resolving references to bindings (loosely, "variables") within the function code, that link is used (and its link to its outer environment, etc.) to find the relevant binding.What VS Code is telling you is that the function
xrefers to closes over the environment for the call tomiddle, which in turn closes over the call toouter, which in turn closes over the global environment. (And it's also showing the contents of those environments, which is handy.)