debug: make createProcess private and remove startDebugSession from exHostDebugService

fixes #36132
This commit is contained in:
isidor
2017-10-13 11:06:51 +02:00
parent 0cd0f70b35
commit 55643dd7e3
6 changed files with 2 additions and 41 deletions

View File

@@ -80,22 +80,6 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape {
});
}
public $startDebugSession(folderUri: uri | undefined, configuration: IConfig): TPromise<DebugSessionUUID> {
if (configuration.request !== 'launch' && configuration.request !== 'attach') {
return TPromise.wrapError(new Error(`only 'launch' or 'attach' allowed for 'request' attribute`));
}
const folder = folderUri ? this.contextService.getWorkspace().folders.filter(wf => wf.uri.toString() === folderUri.toString()).pop() : undefined;
return this.debugService.createProcess(folder, configuration).then(process => {
if (process) {
return <DebugSessionUUID>process.getId();
}
return TPromise.wrapError<DebugSessionUUID>(new Error('cannot create debug session'));
}, err => {
return TPromise.wrapError(err && err.message ? err.message : 'cannot start debug session');
});
}
public $customDebugAdapterRequest(sessionId: DebugSessionUUID, request: string, args: any): TPromise<any> {
const process = this.debugService.findProcessByUUID(sessionId);
if (process) {