debug: better error handling for wrong compound configuraitons

fixes #16615
This commit is contained in:
isidor
2017-01-31 16:33:07 +01:00
parent 56d8b61cd1
commit bb72eee06d

View File

@@ -573,6 +573,9 @@ export class DebugService implements debug.IDebugService {
return TPromise.join(compound.configurations.map(name => this.createProcess(name)));
}
const config = typeof configurationOrName === 'string' ? this.configurationManager.getConfiguration(configurationOrName) : configurationOrName;
if (!config) {
return TPromise.wrapError(new Error(nls.localize('configMissing', "Configuration '{0}' is missing in 'launch.json'.", configurationOrName)));
}
return this.configurationManager.resloveConfiguration(config).then(resolvedConfig => {
if (!resolvedConfig) {