Skip to content

Commit af2e1fa

Browse files
authored
Merge pull request #100290 from microsoft/isidorn/do-not-store-configs
debug: do not store configurations in storage
2 parents 3265cc3 + fea1947 commit af2e1fa

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ jsonRegistry.registerSchema(launchSchemaId, launchSchema);
4646

4747
const DEBUG_SELECTED_CONFIG_NAME_KEY = 'debug.selectedconfigname';
4848
const DEBUG_SELECTED_ROOT = 'debug.selectedroot';
49-
const DEBUG_SELECTED_CONFIG = 'debug.selectedconfig';
5049

5150
export class ConfigurationManager implements IConfigurationManager {
5251
private debuggers: Debugger[];
@@ -84,12 +83,10 @@ export class ConfigurationManager implements IConfigurationManager {
8483
const previousSelectedRoot = this.storageService.get(DEBUG_SELECTED_ROOT, StorageScope.WORKSPACE);
8584
const previousSelectedLaunch = this.launches.find(l => l.uri.toString() === previousSelectedRoot);
8685
this.debugConfigurationTypeContext = CONTEXT_DEBUG_CONFIGURATION_TYPE.bindTo(contextKeyService);
87-
const storedConfig = this.storageService.get(DEBUG_SELECTED_CONFIG, StorageScope.WORKSPACE);
88-
const selectedConfig = typeof storedConfig === 'string' ? JSON.parse(storedConfig) : undefined;
8986
if (previousSelectedLaunch && previousSelectedLaunch.getConfigurationNames().length) {
90-
this.selectConfiguration(previousSelectedLaunch, this.storageService.get(DEBUG_SELECTED_CONFIG_NAME_KEY, StorageScope.WORKSPACE), selectedConfig);
87+
this.selectConfiguration(previousSelectedLaunch, this.storageService.get(DEBUG_SELECTED_CONFIG_NAME_KEY, StorageScope.WORKSPACE));
9188
} else if (this.launches.length > 0) {
92-
this.selectConfiguration(undefined, selectedConfig ? selectedConfig.name : undefined, selectedConfig);
89+
this.selectConfiguration(undefined);
9390
}
9491
}
9592

@@ -486,10 +483,8 @@ export class ConfigurationManager implements IConfigurationManager {
486483
this.selectedConfig = config || (this.selectedLaunch && this.selectedName ? this.selectedLaunch.getConfiguration(this.selectedName) : undefined);
487484
if (this.selectedConfig) {
488485
this.debugConfigurationTypeContext.set(this.selectedConfig.type);
489-
this.storageService.store(DEBUG_SELECTED_CONFIG, JSON.stringify(this.selectedConfig), StorageScope.WORKSPACE);
490486
} else {
491487
this.debugConfigurationTypeContext.reset();
492-
this.storageService.remove(DEBUG_SELECTED_CONFIG, StorageScope.WORKSPACE);
493488
}
494489

495490
if (this.selectedLaunch !== previousLaunch || this.selectedName !== previousName) {

0 commit comments

Comments
 (0)