add DebugSession.terminate; see #101883

This commit is contained in:
Andre Weinand
2020-07-08 17:47:51 +02:00
parent af9af1ea05
commit e308dd3b36
4 changed files with 21 additions and 0 deletions

View File

@@ -262,6 +262,14 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
return Promise.reject(new Error('debug session not found'));
}
public $terminateDebugSession(sessionId: DebugSessionUUID): Promise<void> {
const session = this.debugService.getModel().getSession(sessionId, true);
if (session) {
return session.terminate();
}
return Promise.reject(new Error('debug session not found'));
}
public $appendDebugConsole(value: string): void {
// Use warning as severity to get the orange color for messages coming from the debug extension
const session = this.debugService.getViewModel().focusedSession;