Change:
Testing microsoft/vscode-python Following the steps, I first used the auto-generated launch configuration. This meant that it didn't exist in the I then repeated the steps by clicking the gear to create it in the the dropdown now has 2 entries with duplicate titles. I would expect that the non-file-backed configuration just disappears now that we use a Not sure if this is extension specific or the responsibility of core.
How did you trigger second time to get the dynamic one? after creating the After, , i don't see the debug welcome screen.
Using one of these methods
Thanks for the bug report. VSCode handles the auto debug configuration behavior, so I'll transfer the issue to their repository.
This still repros: ! Steps: with no file open, show all automatic: ! python -Get expected error: ! one shows up... great... now pick : ! hit the on : ! See two: !
Additionally... maybe a different issue, I noticed that if I do this: with no file open, show all automatic: ! python -Get expected error: ! one shows up... great... now pick : ! Hit to get rid of the quick pick: ! is still selected in the ! and the only way to get back to the Picker I escaped out of is to choose a different launch config in the drop down and then select again. Seems a bit odd. I would have expected the play button to give me the picker or selecting even if it's already chosen to re-trigger the picker.
I fixed a different issue... I removed the duplicate from the quick pick, but not from the debug sidebar dropdown. Same data source, I think the dropdown just needs something else to refresh it.
Handling these dynamic configs is tricky - the way they are represented, they look mostly the same as a real launch config with the same name, and there is probably another case where we fail to tell the difference
Following the steps, I now get 2 different titles but still very similar. Not sure if this is breaking any checks that you do <img width="212" alt="image" src="https://user-"
How did you get without the ? I tried again and don't see that. Is that the name in your I have and <img width="173" alt="image" src="https://user-"and I'm not sure how to get a different name in the saved config.
That is what was generated in my launch config, yes, I did not create it manually. I am on Windows.
I can't repro it. If you want, you can show me. But, if this happens somehow, I don't think I can improve the situation anyway, because two configs with different names are just two different configs.
I still managed to repro using SteVen's original steps in this issue <img width="248" alt="image" src="https://user-"
I can't repro the issue, are you sure you didn't end up with duplicate entries in If not can you open the quick access for and share a screenshot? Or just call me sometime so I can try?
This issue has been closed automatically because it needs more information and has not had recent activity. See also our guidelines. Happy Coding!

Discussion:
*  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ <del> import * as nls from 'vs/nls'; import { dispose, IDisposable, DisposableStore } from 'vs/base/common/lifecycle'; import { Event, Emitter } from 'vs/base/common/event'; import * as objects from 'vs/base/common/objects'; </del> <ins> import { distinct, flatten } from 'vs/base/common/arrays'; import { sequence } from 'vs/base/common/async'; import { CancellationToken, CancellationTokenSource } from 'vs/base/common/cancellation'; import { Emitter, Event } from 'vs/base/common/event'; </ins> import * as json from 'vs/base/common/json'; <del> import { URI as uri } from 'vs/base/common/uri'; import * as resources from 'vs/base/common/resources'; </del> import { IJSONSchema } from 'vs/base/common/jsonSchema'; <del> import { IEditorPane } from 'vs/workbench/common/editor'; import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; </del> <ins> import { DisposableStore, dispose, IDisposable } from 'vs/base/common/lifecycle'; import * as objects from 'vs/base/common/objects'; import * as resources from 'vs/base/common/resources'; import { withUndefinedAsNull } from 'vs/base/common/types'; import { URI as uri } from 'vs/base/common/uri'; import * as nls from 'vs/nls'; import { ConfigurationTarget, IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; </ins> import { IFileService } from 'vs/platform/files/common/files'; <del> import { IWorkspaceContextService, IWorkspaceFolder, WorkbenchState, IWorkspaceFoldersChangeEvent } from 'vs/platform/workspace/common/workspace'; </del> import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; <del> import { IDebugConfigurationProvider, ICompound, IConfig, IGlobalConfig, IConfigurationManager, ILaunch, CONTEXT_DEBUG_CONFIGURATION_TYPE, IConfigPresentation, DebugConfigurationProviderTriggerKind } from 'vs/workbench/contrib/debug/common/debug'; import { IEditorService, ACTIVE_GROUP } from 'vs/workbench/services/editor/common/editorService'; import { launchSchemaId } from 'vs/workbench/services/configuration/common/configuration'; import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences'; import { Registry } from 'vs/platform/registry/common/platform'; import { IJSONContributionRegistry, Extensions as JSONExtensions } from 'vs/platform/jsonschemas/common/jsonContributionRegistry'; import { launchSchema } from 'vs/workbench/contrib/debug/common/debugSchemas'; </del> <ins> import { Extensions as JSONExtensions, IJSONContributionRegistry } from 'vs/platform/jsonschemas/common/jsonContributionRegistry'; </ins> import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput'; <del> import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { CancellationToken, CancellationTokenSource } from 'vs/base/common/cancellation'; import { withUndefinedAsNull } from 'vs/base/common/types'; import { sequence } from 'vs/base/common/async'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { flatten, distinct } from 'vs/base/common/arrays'; import { getVisibleAndSorted } from 'vs/workbench/contrib/debug/common/debugUtils'; </del> <ins> import { Registry } from 'vs/platform/registry/common/platform'; import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; import { ThemeIcon } from 'vs/platform/theme/common/themeService'; </ins> import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity'; <ins> import { IWorkspaceContextService, IWorkspaceFolder, IWorkspaceFoldersChangeEvent, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { IEditorPane } from 'vs/workbench/common/editor'; </ins> import { AdapterManager } from 'vs/workbench/contrib/debug/browser/debugAdapterManager'; import { debugConfigure } from 'vs/workbench/contrib/debug/browser/debugIcons'; <del> import { ThemeIcon } from 'vs/platform/theme/common/themeService'; </del> <ins> import { CONTEXT_DEBUG_CONFIGURATION_TYPE, DebugConfigurationProviderTriggerKind, ICompound, IConfig, IConfigPresentation, IConfigurationManager, IDebugConfigurationProvider, IGlobalConfig, ILaunch } from 'vs/workbench/contrib/debug/common/debug'; import { launchSchema } from 'vs/workbench/contrib/debug/common/debugSchemas'; import { getVisibleAndSorted } from 'vs/workbench/contrib/debug/common/debugUtils'; import { launchSchemaId } from 'vs/workbench/services/configuration/common/configuration'; import { ACTIVE_GROUP, IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; </ins> const jsonRegistry = Registry.as<IJSONContributionRegistry>(JSONExtensions.JSONContribution); jsonRegistry.registerSchema(launchSchemaId, launchSchema);

private selectedLaunch: ILaunch | undefined; private getSelectedConfig: () => Promise<IConfig | undefined> = () => Promise.resolve(undefined); private selectedType: string | undefined; <ins> private selectedDynamic = false; </ins> private toDispose: IDisposable[]; private readonly _onDidSelectConfigurationName = new Emitter<void>(); private configProviders: IDebugConfigurationProvider[];

removeRecentDynamicConfigurations(name: string, type: string) { const remaining = this.getRecentDynamicConfigurations().filter(c => c.name !== name || c.type !== type); this.storageService.store(DEBUG_RECENT_DYNAMIC_CONFIGURATIONS, JSON.stringify(remaining), StorageScope.WORKSPACE, StorageTarget.USER); <del> if (this.selectedConfiguration.name === name && this.selectedType === type) { </del> <ins> if (this.selectedConfiguration.name === name && this.selectedType === type && this.selectedDynamic) { </ins> this.selectConfiguration(undefined, undefined); } else { this._onDidSelectConfigurationName.fire();

const previousLaunch = this.selectedLaunch; const previousName = this.selectedName; <ins> const previousSelectedDynamic = this.selectedDynamic; </ins> this.selectedLaunch = launch; if (this.selectedLaunch) {

} this.selectedType = dynamicConfig?.type || config?.type; <ins> this.selectedDynamic = !!dynamicConfig; </ins> // Only store the selected type if we are having a dynamic configuration. Otherwise restoring this configuration from storage might be misindentified as a dynamic configuration this.storageService.store(DEBUG_SELECTED_TYPE, dynamicConfig ? this.selectedType : undefined, StorageScope.WORKSPACE, StorageTarget.MACHINE);

this.debugConfigurationTypeContext.reset(); } <del> if (this.selectedLaunch !== previousLaunch || this.selectedName !== previousName) { </del> <ins> if (this.selectedLaunch !== previousLaunch || this.selectedName !== previousName || previousSelectedDynamic !== this.selectedDynamic) { </ins> this._onDidSelectConfigurationName.fire(); } }