From 9d27bbe7ae49d7b3d843f59a3bbffa1c8090fc90 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 19 Feb 2020 15:32:03 +0100 Subject: [PATCH] fixes #90940 --- src/vs/workbench/contrib/debug/browser/debugSession.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/contrib/debug/browser/debugSession.ts b/src/vs/workbench/contrib/debug/browser/debugSession.ts index 8af3f1ee82f5b..00ed0d36faf4c 100644 --- a/src/vs/workbench/contrib/debug/browser/debugSession.ts +++ b/src/vs/workbench/contrib/debug/browser/debugSession.ts @@ -915,14 +915,13 @@ export class DebugSession implements IDebugSession { // Disconnects and clears state. Session can be initialized again for a new connection. private shutdown(): void { dispose(this.rawListeners); - this.fetchThreadsScheduler = undefined; - this.model.clearThreads(this.getId(), true); if (this.raw) { - const raw = this.raw; + this.raw.disconnect(); + this.raw.dispose(); this.raw = undefined; - raw.disconnect(); - raw.dispose(); } + this.fetchThreadsScheduler = undefined; + this.model.clearThreads(this.getId(), true); this._onDidChangeState.fire(); }