diff --git a/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts b/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts index 767b547b64f82427da176aca2530561a1fd60554..2bdfc9c8bf97fc3bf87214243673a54ce537165a 100644 --- a/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts +++ b/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts @@ -161,9 +161,6 @@ export class StartDebugActionViewItem implements IActionViewItem { let lastGroup: string | undefined; const disabledIdxs: number[] = []; manager.getAllConfigurations().forEach(({ launch, name, presentation }) => { - if (name === manager.selectedConfiguration.name && launch === manager.selectedConfiguration.launch) { - this.selected = this.options.length; - } if (lastGroup !== presentation?.group) { lastGroup = presentation?.group; if (this.options.length) { @@ -171,6 +168,9 @@ export class StartDebugActionViewItem implements IActionViewItem { disabledIdxs.push(this.options.length - 1); } } + if (name === manager.selectedConfiguration.name && launch === manager.selectedConfiguration.launch) { + this.selected = this.options.length; + } const label = inWorkspace ? `${name} (${launch.name})` : name; this.options.push({ label, handler: () => { manager.selectConfiguration(launch, name); return true; } });