add API to access DAP breakpoints; see #99716

This commit is contained in:
Andre Weinand
2020-08-17 12:30:02 +02:00
parent 652a432f59
commit c233bf87bc
8 changed files with 61 additions and 0 deletions
@@ -264,6 +264,14 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
return Promise.reject(new Error('debug session not found'));
}
public $getDebugProtocolBreakpoint(sessionId: DebugSessionUUID, breakpoinId: string): Promise<DebugProtocol.Breakpoint | undefined> {
const session = this.debugService.getModel().getSession(sessionId, true);
if (session) {
return Promise.resolve(session.getDebugProtocolBreakpoint(breakpoinId));
}
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);