From 9ca25605655a15677f1d3a897f0c766900aae40f Mon Sep 17 00:00:00 2001 From: Andy Jordan Date: Wed, 2 Nov 2022 11:34:11 -0700 Subject: [PATCH] Guard `-WaitForDebugger` flag client-side too --- src/session.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/session.ts b/src/session.ts index c3fcb3848b..53f2a38423 100644 --- a/src/session.ts +++ b/src/session.ts @@ -331,7 +331,7 @@ export class SessionManager implements Middleware { // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition if ((resolvedCodeLens as Thenable).then) { return (resolvedCodeLens as Thenable).then(resolveFunc); - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition } else if (resolvedCodeLens as vscode.CodeLens) { return resolveFunc(resolvedCodeLens as vscode.CodeLens); } @@ -571,7 +571,9 @@ Type 'help' to get help. editorServicesArgs += `-StartupBanner "${startupBanner}" `; } - if (this.sessionSettings.developer.editorServicesWaitForDebugger) { + // We guard this here too out of an abundance of precaution. + if (this.sessionSettings.developer.editorServicesWaitForDebugger + && this.extensionContext.extensionMode === vscode.ExtensionMode.Development) { editorServicesArgs += "-WaitForDebugger "; }