mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
new proposed API stopDebugging; see #101883
This commit is contained in:
@@ -270,6 +270,18 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
|
||||
return Promise.reject(new Error('debug session not found'));
|
||||
}
|
||||
|
||||
public $stopDebugging(sessionId: DebugSessionUUID | undefined): Promise<void> {
|
||||
if (sessionId) {
|
||||
const session = this.debugService.getModel().getSession(sessionId, true);
|
||||
if (session) {
|
||||
return this.debugService.stopSession(session);
|
||||
}
|
||||
} else { // stop all
|
||||
return this.debugService.stopSession(undefined);
|
||||
}
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user