Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Lourens <roblourens@gmail.com>2022-08-03 08:14:29 +0300
committerGitHub <noreply@github.com>2022-08-03 08:14:29 +0300
commitda76f93349a72022ca4670c1b84860304616aaa2 (patch)
treec82429a05c4cac85f4186d4c65282bcd4930c652
parente9bda7aa4ff76648cfccc1a7bde465443803da71 (diff)
Fix getting initial configs from debug adapter (#156947)1.70.0
Fixes #156943
-rw-r--r--src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts6
-rw-r--r--src/vs/workbench/contrib/debug/browser/debugQuickAccess.ts2
-rw-r--r--src/vs/workbench/contrib/debug/common/debug.ts2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts b/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts
index a00d75ef26a..5ccaf7933c3 100644
--- a/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts
+++ b/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts
@@ -215,7 +215,7 @@ export class ConfigurationManager implements IConfigurationManager {
disposables.add(input.onDidTriggerItemButton(async (context) => {
resolve(undefined);
const { launch, config } = context.item;
- await launch.openConfigFile({ preserveFocus: false, type: config.type });
+ await launch.openConfigFile({ preserveFocus: false, type: config.type, suppressInitialConfigs: true });
// Only Launch have a pin trigger button
await (launch as Launch).writeConfiguration(config);
await this.selectConfiguration(launch, config.name);
@@ -564,7 +564,7 @@ class Launch extends AbstractLaunch implements ILaunch {
return this.configurationService.inspect<IGlobalConfig>('launch', { resource: this.workspace.uri }).workspaceFolderValue;
}
- async openConfigFile({ preserveFocus, type, useInitialConfigs }: { preserveFocus: boolean; type?: string; useInitialConfigs?: boolean }, token?: CancellationToken): Promise<{ editor: IEditorPane | null; created: boolean }> {
+ async openConfigFile({ preserveFocus, type, suppressInitialConfigs }: { preserveFocus: boolean; type?: string; suppressInitialConfigs?: boolean }, token?: CancellationToken): Promise<{ editor: IEditorPane | null; created: boolean }> {
const resource = this.uri;
let created = false;
let content = '';
@@ -573,7 +573,7 @@ class Launch extends AbstractLaunch implements ILaunch {
content = fileContent.value.toString();
} catch {
// launch.json not found: create one by collecting launch configs from debugConfigProviders
- content = await this.getInitialConfigurationContent(this.workspace.uri, type, useInitialConfigs, token);
+ content = await this.getInitialConfigurationContent(this.workspace.uri, type, !suppressInitialConfigs, token);
if (!content) {
// Cancelled
return { editor: null, created: false };
diff --git a/src/vs/workbench/contrib/debug/browser/debugQuickAccess.ts b/src/vs/workbench/contrib/debug/browser/debugQuickAccess.ts
index 6cd33d34f5c..9e338934aad 100644
--- a/src/vs/workbench/contrib/debug/browser/debugQuickAccess.ts
+++ b/src/vs/workbench/contrib/debug/browser/debugQuickAccess.ts
@@ -63,7 +63,7 @@ export class StartDebugQuickAccessProvider extends PickerQuickAccessProvider<IPi
tooltip: localize('customizeLaunchConfig', "Configure Launch Configuration")
}],
trigger: () => {
- config.launch.openConfigFile({ preserveFocus: false, useInitialConfigs: false });
+ config.launch.openConfigFile({ preserveFocus: false });
return TriggerAction.CLOSE_PICKER;
},
diff --git a/src/vs/workbench/contrib/debug/common/debug.ts b/src/vs/workbench/contrib/debug/common/debug.ts
index ca1c5e318d2..44fec50c3d1 100644
--- a/src/vs/workbench/contrib/debug/common/debug.ts
+++ b/src/vs/workbench/contrib/debug/common/debug.ts
@@ -927,7 +927,7 @@ export interface ILaunch {
/**
* Opens the launch.json file. Creates if it does not exist.
*/
- openConfigFile(options: { preserveFocus: boolean; type?: string; useInitialConfigs?: boolean }, token?: CancellationToken): Promise<{ editor: IEditorPane | null; created: boolean }>;
+ openConfigFile(options: { preserveFocus: boolean; type?: string; suppressInitialConfigs?: boolean }, token?: CancellationToken): Promise<{ editor: IEditorPane | null; created: boolean }>;
}
// Debug service interfaces