From 02970ec5816444f921a2a7bb29f1a70409754313 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 1 Jun 2016 11:06:07 +0200 Subject: [PATCH] debug: only convert strings in configuration --- .../debug/node/debugConfigurationManager.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/parts/debug/node/debugConfigurationManager.ts b/src/vs/workbench/parts/debug/node/debugConfigurationManager.ts index 6dca75807c6..982a99e397e 100644 --- a/src/vs/workbench/parts/debug/node/debugConfigurationManager.ts +++ b/src/vs/workbench/parts/debug/node/debugConfigurationManager.ts @@ -245,14 +245,16 @@ export class ConfigurationManager implements debug.IConfigurationManager { public resolveInteractiveVariables(): TPromise { const factory = Object.keys(this.configuration).map(key => { return () => { - const matches = /\${action.(.+)}/.exec(this.configuration[key]); - if (matches && matches.length === 2) { - const commandId = this.adapter.variables[matches[1]]; - if (!commandId) { - return TPromise.wrapError(nls.localize('interactiveVariableNotFound', "Adapter {0} does not contribute variable {1} that is specified in launch configuration.", this.adapter.type, matches[1])); - } else { - return this.keybindingService.executeCommand(commandId, this.configuration) - .then(result => result ? this.configuration[key] = result : this.configuration.silentlyAbort = true); + if (typeof this.configuration[key] === 'string') { + const matches = /\${action.(.+)}/.exec(this.configuration[key]); + if (matches && matches.length === 2) { + const commandId = this.adapter.variables[matches[1]]; + if (!commandId) { + return TPromise.wrapError(nls.localize('interactiveVariableNotFound', "Adapter {0} does not contribute variable {1} that is specified in launch configuration.", this.adapter.type, matches[1])); + } else { + return this.keybindingService.executeCommand(commandId, this.configuration) + .then(result => result ? this.configuration[key] = result : this.configuration.silentlyAbort = true); + } } } -- GitLab