From 0a490a5e683ec5fa1592edb4a0f7e0abfd9c8d89 Mon Sep 17 00:00:00 2001 From: markw65 Date: Wed, 12 Apr 2023 08:40:23 -0700 Subject: [PATCH] Fix the race for the javascript terminal too --- src/adapter/threads.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/adapter/threads.ts b/src/adapter/threads.ts index 920f6108b..27be0d6d8 100644 --- a/src/adapter/threads.ts +++ b/src/adapter/threads.ts @@ -1411,7 +1411,8 @@ export class Thread implements IVariableStoreLocationProvider { // initial scripts. Pretend these are actually loaded in the 2nd (main) context. // https://github.com/nodejs/node/issues/47438 if ( - this.launchConfig.type === DebugType.Node && + (this.launchConfig.type === DebugType.Node || + this.launchConfig.type === DebugType.Terminal) && event.executionContextId === 0 && !this._executionContexts.has(0) ) {