From 4dc9964ee30d0b90844028ecce77ee92dabcb38c Mon Sep 17 00:00:00 2001 From: Vladimir Popov Date: Wed, 30 Mar 2022 12:19:47 +0700 Subject: [PATCH] Fix debug session to be deleted in $sessionDidDestroy instead of $terminateDebugSession Signed-off-by: Vladimir Popov --- packages/plugin-ext/src/plugin/node/debug/debug.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-ext/src/plugin/node/debug/debug.ts b/packages/plugin-ext/src/plugin/node/debug/debug.ts index b1614ce5205bb..8f1bcb251b1a7 100644 --- a/packages/plugin-ext/src/plugin/node/debug/debug.ts +++ b/packages/plugin-ext/src/plugin/node/debug/debug.ts @@ -230,6 +230,7 @@ export class DebugExtImpl implements DebugExt { const session = this.sessions.get(sessionId); if (session) { this.onDidTerminateDebugSessionEmitter.fire(session); + this.sessions.delete(sessionId); } } @@ -319,7 +320,6 @@ export class DebugExtImpl implements DebugExt { const debugAdapterSession = this.sessions.get(sessionId); if (debugAdapterSession) { await debugAdapterSession.stop(); - this.sessions.delete(sessionId); } }