提交 5d9cfa9b 编写于 作者: I isidor

onDebugInitialConfigurations and onDebugResolve:type activation events

fixes #37918
上级 867fc4ba
......@@ -514,7 +514,7 @@ class Launch implements ILaunch {
}
public openConfigFile(sideBySide: boolean, type?: string): TPromise<IEditor> {
return this.extensionService.activateByEvent('onDebug').then(() => {
return this.extensionService.activateByEvent('onDebugInitialConfigurations').then(() => this.extensionService.activateByEvent('onDebug').then(() => {
const resource = this.uri;
let configFileCreated = false;
......@@ -567,6 +567,6 @@ class Launch implements ILaunch {
}, (error) => {
throw new Error(nls.localize('DebugConfig.failed', "Unable to create 'launch.json' file inside the '.vscode' folder ({0}).", error));
});
});
}));
}
}
......@@ -731,7 +731,7 @@ export class DebugService implements debug.IDebugService {
}
private createProcess(root: IWorkspaceFolder, config: debug.IConfig, sessionId: string): TPromise<void> {
return this.textFileService.saveAll().then(() =>
return this.extensionService.activateByEvent(`onDebugResolve:${config.type}`).then(() => this.textFileService.saveAll().then(() =>
(this.configurationManager.selectedLaunch ? this.configurationManager.selectedLaunch.resolveConfiguration(config) : TPromise.as(config)).then(resolvedConfig => {
if (!resolvedConfig) {
// User canceled resolving of interactive variables, silently return
......@@ -801,7 +801,7 @@ export class DebugService implements debug.IDebugService {
return undefined;
});
})
);
));
}
private doCreateProcess(root: IWorkspaceFolder, configuration: debug.IConfig, sessionId: string): TPromise<debug.IProcess> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册