diff options
author | isidor <inikolic@microsoft.com> | 2018-02-13 18:06:29 +0300 |
---|---|---|
committer | isidor <inikolic@microsoft.com> | 2018-02-13 18:06:40 +0300 |
commit | f88bbf9137d24d36d968ea6b2911786bfe103002 (patch) | |
tree | 0269f14a36cce612f1706364ab82923f5e114532 | |
parent | 1287a5dd31956b2a696fb0d7d0cda93993a5af6d (diff) |
debug: only get workspace to resolve agains for user launch1.20.1release/1.20
-rw-r--r-- | src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts | 14 |
1 files 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<IEditor> { 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; } |