diff --git a/src/adapter/stackTrace.ts b/src/adapter/stackTrace.ts index e62ca3882..715b099d0 100644 --- a/src/adapter/stackTrace.ts +++ b/src/adapter/stackTrace.ts @@ -216,7 +216,7 @@ export class StackFrame { if (scope.name && scope.type === 'closure') { name = localize('scope.closureNamed', 'Closure ({0})', scope.name); } else if (scope.name) { - name = scope.name; + name = `${name}: ${scope.name}`; } const variable = await this._scopeVariable(scopeNumber); @@ -289,7 +289,7 @@ export class StackFrame { if (!scope.variables[scopeNumber]) { const scopeRef: ScopeRef = { callFrameId: scope.callFrameId, scopeNumber }; const extraProperties: ExtraProperty[] = []; - if (scopeNumber === 0 && scope.chain[scopeNumber].type === 'local') { + if (scopeNumber === 0) { extraProperties.push({name: 'this', value: scope.thisObject}); if (scope.returnValue) extraProperties.push({name: localize('scope.returnValue', 'Return value'), value: scope.returnValue}); diff --git a/src/test/stacks/stacks-anonymous-scopes.txt b/src/test/stacks/stacks-anonymous-scopes.txt index acd705e53..700c6f428 100644 --- a/src/test/stacks/stacks-anonymous-scopes.txt +++ b/src/test/stacks/stacks-anonymous-scopes.txt @@ -1,12 +1,12 @@ paused @ /VM:4:9 - > scope #0: paused + > scope #0: Local: paused y: 'paused' > this: Window scope #1: Global [expensive] chained @ /VM:11:23 - > scope #0: chained + > scope #0: Local: chained x: 'x1' > this: Window > scope #1: Closure (chain) @@ -14,7 +14,7 @@ chained @ /VM:11:23 scope #2: Global [expensive] chained @ /VM:11:23 - > scope #0: chained + > scope #0: Local: chained x: 'x2' > this: Window > scope #1: Closure (chain) @@ -22,7 +22,7 @@ chained @ /VM:11:23 scope #2: Global [expensive] chained @ /VM:11:23 - > scope #0: chained + > scope #0: Local: chained x: 'x3' > this: Window > scope #1: Closure (chain) diff --git a/src/test/stacks/stacks-async-disables.txt b/src/test/stacks/stacks-async-disables.txt index 6a5961dc3..04a2b68b9 100644 --- a/src/test/stacks/stacks-async-disables.txt +++ b/src/test/stacks/stacks-async-disables.txt @@ -1,12 +1,12 @@ foo @ /VM:4:11 - > scope #0: foo + > scope #0: Local: foo n: 0 > this: Window scope #1: Global [expensive] bar @ /VM:13:15 - > scope #0: bar + > scope #0: Local: bar n: 0 > this: Window scope #1: Global [expensive] diff --git a/src/test/stacks/stacks-async.txt b/src/test/stacks/stacks-async.txt index 6c636c0df..64d212c61 100644 --- a/src/test/stacks/stacks-async.txt +++ b/src/test/stacks/stacks-async.txt @@ -1,12 +1,12 @@ foo @ /VM:4:11 - > scope #0: foo + > scope #0: Local: foo n: 0 > this: Window scope #1: Global [expensive] bar @ /VM:13:15 - > scope #0: bar + > scope #0: Local: bar n: 0 > this: Window scope #1: Global [expensive] diff --git a/src/test/stacks/stacks-blackboxed.txt b/src/test/stacks/stacks-blackboxed.txt deleted file mode 100644 index c7666dc55..000000000 --- a/src/test/stacks/stacks-blackboxed.txt +++ /dev/null @@ -1,2 +0,0 @@ -foo @ ${workspaceFolder}/web/browserify/module1.ts:3:2 -3../module1 @ ${workspaceFolder}/web/browserify/pause.ts:4:3 diff --git a/src/test/stacks/stacks-return-value.txt b/src/test/stacks/stacks-return-value.txt index 796ed7acf..1f1436d4d 100644 --- a/src/test/stacks/stacks-return-value.txt +++ b/src/test/stacks/stacks-return-value.txt @@ -1,6 +1,6 @@ foo @ /VM:4:19 - > scope #0: foo + > scope #0: Local: foo > this: Window Return value: 42 scope #1: Global [expensive] diff --git a/src/test/stacks/stacks-source-map.txt b/src/test/stacks/stacks-source-map.txt index a3446d94a..f9a3f17ec 100644 --- a/src/test/stacks/stacks-source-map.txt +++ b/src/test/stacks/stacks-source-map.txt @@ -1,11 +1,11 @@ foo @ ${workspaceFolder}/web/browserify/module1.ts:3:2 - > scope #0: foo + > scope #0: Local: foo this: undefined scope #1: Global [expensive] bar @ ${workspaceFolder}/web/browserify/module2.ts:3:2 - > scope #0: bar + > scope #0: Local: bar > callback: ƒ foo() { debugger; @@ -14,7 +14,7 @@ bar @ ${workspaceFolder}/web/browserify/module2.ts:3:2 scope #1: Global [expensive] 3../module1 @ ${workspaceFolder}/web/browserify/pause.ts:4:3 - > scope #0: 3../module1 + > scope #0: Local: 3../module1 > exports: {__esModule: true} > m1: {__esModule: true, kModule1: 1, foo: ƒ, throwError: ƒ, throwValue: ƒ} > m2: {__esModule: true, kModule2: 2, bar: ƒ, pause: ƒ} @@ -24,7 +24,7 @@ bar @ ${workspaceFolder}/web/browserify/module2.ts:3:2 scope #1: Global [expensive] o @ ${workspaceFolder}/node_modules/browser-pack/_prelude.js:1:1 - > scope #0: o + > scope #0: Local: o a: undefined c: undefined f: undefined @@ -42,7 +42,7 @@ o @ ${workspaceFolder}/node_modules/browser-pack/_prelude.js:1:1 scope #3: Global [expensive] r @ ${workspaceFolder}/node_modules/browser-pack/_prelude.js:1:1 - > scope #0: r + > scope #0: Local: r > e: {1: Array(2), 2: Array(2), 3: Array(2)} i: 0 > n: {1: {…}, 2: {…}, 3: {…}} diff --git a/src/test/stacks/stacks-stack-in-eval.txt b/src/test/stacks/stacks-stack-in-eval.txt deleted file mode 100644 index af2442b01..000000000 --- a/src/test/stacks/stacks-stack-in-eval.txt +++ /dev/null @@ -1 +0,0 @@ - @ eval.js:3:1 diff --git a/src/test/variables/variables-setvariable-scope.txt b/src/test/variables/variables-setvariable-scope.txt index 1be20694c..777f8eef7 100644 --- a/src/test/variables/variables-setvariable-scope.txt +++ b/src/test/variables/variables-setvariable-scope.txt @@ -4,7 +4,7 @@ stopped: { reason : pause threadId : } -> scope: foo +> scope: Local: foo y: 'value of y' z: 'value of z' > this: Window @@ -13,7 +13,7 @@ Setting "y" to "z" : 'value of z' Original -> scope: foo +> scope: Local: foo y: 'value of z' z: 'value of z' > this: Window