From 65dd9c05484c4ac643d90a07f9ca3f7ad159f483 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 22 Jun 2018 17:37:41 +0200 Subject: [PATCH] fixes #52192 --- src/vs/workbench/parts/debug/browser/debugActions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/debugActions.ts b/src/vs/workbench/parts/debug/browser/debugActions.ts index d1f29cf4eed..26931ec59c2 100644 --- a/src/vs/workbench/parts/debug/browser/debugActions.ts +++ b/src/vs/workbench/parts/debug/browser/debugActions.ts @@ -136,12 +136,12 @@ export class StartAction extends AbstractDebugAction { public run(): TPromise { const configurationManager = this.debugService.getConfigurationManager(); let launch = configurationManager.selectedConfiguration.launch; - if (!launch) { + if (!launch || launch.getConfigurationNames().length === 0) { const rootUri = this.historyService.getLastActiveWorkspaceRoot(); launch = configurationManager.getLaunch(rootUri); if (!launch || launch.getConfigurationNames().length === 0) { const launches = configurationManager.getLaunches(); - launch = first(launches, l => !!l.getConfigurationNames().length, launches.length ? launches[0] : launch); + launch = first(launches, l => !!l.getConfigurationNames().length, launch); } configurationManager.selectConfiguration(launch); -- GitLab