From f88bbf9137d24d36d968ea6b2911786bfe103002 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 13 Feb 2018 16:06:29 +0100 Subject: [PATCH] debug: only get workspace to resolve agains for user launch --- .../electron-browser/debugConfigurationManager.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts index fb7f1037fdf..bc42ac441fb 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; } -- GitLab