提交 516a1fbf 编写于 作者: I isidor

debug: better error handling when 'type' missing

fixes #3343
上级 5e17b014
......@@ -522,7 +522,9 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
}
if (!this.configurationManager.getAdapter()) {
this.emit(debug.ServiceEvents.TYPE_NOT_SUPPORTED, configuration.type);
return TPromise.wrapError(new Error(nls.localize('debugTypeNotSupported', "Configured debug type '{0}' is not supported.", configuration.type)));
return configuration.type ? TPromise.wrapError(new Error(nls.localize('debugTypeNotSupported', "Configured debug type '{0}' is not supported.", configuration.type)))
: TPromise.wrapError(errors.create(nls.localize('debugTypeMissing', "Missing property 'type' for the selected configuration in launch.json."),
{ actions: [CloseAction, this.instantiationService.createInstance(debugactions.ConfigureAction, debugactions.ConfigureAction.ID, debugactions.ConfigureAction.LABEL)] }));
}
return this.runPreLaunchTask(configuration.preLaunchTask).then((taskSummary: ITaskSummary) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册