提交 30c71c5d 编写于 作者: I Isidor Nikolic 提交者: GitHub

Merge pull request #9966 from Meai1/patch-3

Check if adapter is null and let it print errors
......@@ -297,9 +297,12 @@ export class ConfigurationManager implements debug.IConfigurationManager {
const factory: { (): TPromise<any> }[] = Object.keys(interactiveVariablesToSubstitutes).map(interactiveVariable => {
return () => {
const commandId = this.adapter.variables ? this.adapter.variables[interactiveVariable] : null;
let commandId = null;
if (this.adapter !== null) {
commandId = this.adapter.variables ? this.adapter.variables[interactiveVariable] : null;
}
if (!commandId) {
return TPromise.wrapError(nls.localize('interactiveVariableNotFound', "Adapter {0} does not contribute variable {1} that is specified in launch configuration.", this.adapter.type, interactiveVariable));
return TPromise.wrapError(nls.localize('interactiveVariableNotFound', "Adapter {0} does not contribute variable {1} that is specified in launch configuration.", this.adapter !== null ? this.adapter.type : null, interactiveVariable));
} else {
return this.commandService.executeCommand<string>(commandId, this.configuration).then(result => {
if (!result) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册