From e7f022a392ed96a234ccca4106796e8a7b2c685a Mon Sep 17 00:00:00 2001 From: oltolm Date: Fri, 13 Dec 2024 18:10:50 +0100 Subject: [PATCH] debug: ignore error when stopping a process (#236009) ERR Invalid debug adapter: Error: Invalid debug adapter --- src/vs/workbench/api/browser/mainThreadDebugService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/api/browser/mainThreadDebugService.ts b/src/vs/workbench/api/browser/mainThreadDebugService.ts index cccdce7eb4ca3..69edcaa8ecd97 100644 --- a/src/vs/workbench/api/browser/mainThreadDebugService.ts +++ b/src/vs/workbench/api/browser/mainThreadDebugService.ts @@ -397,7 +397,8 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb } public $acceptDAExit(handle: number, code: number, signal: string) { - this.getDebugAdapter(handle).fireExit(handle, code, signal); + // don't use getDebugAdapter since an error can be expected on a post-close + this._debugAdapters.get(handle)?.fireExit(handle, code, signal); } private getDebugAdapter(handle: number): ExtensionHostDebugAdapter {