returnTPromise.wrapError(newError(nls.localize({key:'compoundMustHaveConfigurations',comment:['compound indicates a "compounds" configuration item','"configurations" is an attribute and should not be localized']},
"Compound must have \"configurations\" attribute set in order to start multiple configurations.")));
}
if(compound){
if(!compound.configurations){
returnTPromise.wrapError(newError(nls.localize({key:'compoundMustHaveConfigurations',comment:['compound indicates a "compounds" configuration item','"configurations" is an attribute and should not be localized']},
"Compound must have \"configurations\" attribute set in order to start multiple configurations.")));
// If there are multiple launches containing the configuration give priority to the configuration in the current launch
launchForName=launch;
}else{
returnTPromise.wrapError(newError(launchesContainingName.length===0?nls.localize('noConfigurationNameInWorkspace',"Could not find launch configuration '{0}' in the workspace.",name)
:nls.localize('multipleConfigurationNamesInWorkspace',"There are multiple launch configurations '{0}' in the workspace. Use folder name to qualify the configuration.",name)));
// If there are multiple launches containing the configuration give priority to the configuration in the current launch
launchForName=launch;
}else{
returnTPromise.wrapError(newError(launchesContainingName.length===0?nls.localize('noConfigurationNameInWorkspace',"Could not find launch configuration '{0}' in the workspace.",name)
:nls.localize('multipleConfigurationNamesInWorkspace',"There are multiple launch configurations '{0}' in the workspace. Use folder name to qualify the configuration.",name)));
returnTPromise.wrapError(newError(nls.localize('noFolderWithName',"Can not find folder with name '{0}' for configuration '{1}' in compound '{2}'.",configData.folder,configData.name,compound.name)));
returnTPromise.wrapError(newError(nls.localize('noFolderWithName',"Can not find folder with name '{0}' for configuration '{1}' in compound '{2}'.",configData.folder,configData.name,compound.name)));
constmessage=!!launch?nls.localize('configMissing',"Configuration '{0}' is missing in 'launch.json'.",typeofconfigOrName==='string'?configOrName:JSON.stringify(configOrName)):
nls.localize('launchJsonDoesNotExist',"'launch.json' does not exist.");
constmessage=!!launch?nls.localize('configMissing',"Configuration '{0}' is missing in 'launch.json'.",typeofconfigOrName==='string'?configOrName:JSON.stringify(configOrName)):
nls.localize('launchJsonDoesNotExist',"'launch.json' does not exist.");
returnTPromise.wrapError(newError(message));
}
// We keep the debug type in a separate variable 'type' so that a no-folder config has no attributes.
// Storing the type in the config would break extensions that assume that the no-folder case is indicated by an empty config.