diff --git a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts index fb7f1037fdfe5a55d5a1a54bbbf01647d364f17c..bc42ac441fbecfa1ee068f440a5d024b57cfd049 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts @@ -588,13 +588,17 @@ class Launch implements ILaunch { // massage configuration attributes - append workspace path to relatvie paths, substitute variables in paths. Object.keys(result).forEach(key => { - result[key] = this.configurationResolverService.resolveAny(this.workspace, result[key]); + result[key] = this.configurationResolverService.resolveAny(this.getWorkspaceForResolving(), result[key]); }); const adapter = this.configurationManager.getAdapter(result.type); return this.configurationResolverService.resolveInteractiveVariables(result, adapter ? adapter.variables : null); } + protected getWorkspaceForResolving(): IWorkspaceFolder { + return this.workspace; + } + public openConfigFile(sideBySide: boolean, type?: string): TPromise { const resource = this.uri; let pinned = false; @@ -690,9 +694,9 @@ class UserLaunch extends Launch implements ILaunch { @IConfigurationService configurationService: IConfigurationService, @IConfigurationResolverService configurationResolverService: IConfigurationResolverService, @IPreferencesService private preferencesService: IPreferencesService, - @IWorkspaceContextService contextService: IWorkspaceContextService + @IWorkspaceContextService private contextService: IWorkspaceContextService ) { - super(configurationManager, contextService.getWorkbenchState() === WorkbenchState.FOLDER ? contextService.getWorkspace().folders[0] : undefined, fileService, editorService, configurationService, configurationResolverService); + super(configurationManager, undefined, fileService, editorService, configurationService, configurationResolverService); } get uri(): uri { @@ -703,6 +707,10 @@ class UserLaunch extends Launch implements ILaunch { return nls.localize('user settings', "user settings"); } + protected getWorkspaceForResolving(): IWorkspaceFolder { + return this.contextService.getWorkbenchState() === WorkbenchState.FOLDER ? this.contextService.getWorkspace().folders[0] : undefined; + } + public get hidden(): boolean { return true; }