// If it is the very first start debugging we need to clear the repl and our sessions map
if(this.model.getSessions().length===0){
this.removeReplExpressions();
this.allSessions.clear();
...
...
@@ -291,6 +294,7 @@ export class DebugService implements IDebugService {
}
if(compound){
// we are starting a compound debug, first do some error checking and than start each configuration in the 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.")));
...
...
@@ -299,7 +303,7 @@ export class DebugService implements IDebugService {
})).then(values=>values.every(success=>!!success));// Compound launch is a success only if each configuration launched successfully
}
if(configOrName&&!config){
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.
message=config.request?nls.localize('debugRequestNotSupported',"Attribute '{0}' has an unsupported value '{1}' in the chosen debug configuration.",'request',config.request)
:nls.localize('debugRequesMissing',"Attribute '{0}' is missing from the chosen debug configuration.",'request');
message=config.request?nls.localize('debugRequestNotSupported',"Attribute '{0}' has an unsupported value '{1}' in the chosen debug configuration.",'request',config.request)
:nls.localize('debugRequesMissing',"Attribute '{0}' is missing from the chosen debug configuration.",'request');
}else{
message=resolvedConfig.type?nls.localize('debugTypeNotSupported',"Configured debug type '{0}' is not supported.",resolvedConfig.type):
nls.localize('debugTypeMissing',"Missing property 'type' for the chosen launch configuration.");
}
}else{
message=resolvedConfig.type?nls.localize('debugTypeNotSupported',"Configured debug type '{0}' is not supported.",resolvedConfig.type):
nls.localize('debugTypeMissing',"Missing property 'type' for the chosen launch configuration.");
returnthis.showError(nls.localize('noFolderWorkspaceDebugError',"The active file can not be debugged. Make sure it is saved on disk and that you have a debug extension installed for that file type."))
returnthis.showError(nls.localize('noFolderWorkspaceDebugError',"The active file can not be debugged. Make sure it is saved on disk and that you have a debug extension installed for that file type."));
if(launch&&type&&config===null){// show launch.json only for "config" being "null".