MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / setBreakpoints

Method setBreakpoints

src/debug/threads.ts:265–287  ·  view source on GitHub ↗
(logger: Logger, uri: string, breakpoints: DebugProtocol.SourceBreakpoint[])

Source from the content-addressed store, hash-verified

263 }
264
265 public async setBreakpoints(logger: Logger, uri: string, breakpoints: DebugProtocol.SourceBreakpoint[]): Promise<Array<VMBreakpoint | undefined>> {
266 // Remove all current bps.
267 await this.removeBreakpointsAtUri(uri);
268 this.vmBps[uri] = [];
269
270 return Promise.all(
271 breakpoints.map(async (bp) => {
272 try {
273 if (!this.manager.debugSession.vmService)
274 return undefined;
275
276 const result = await this.manager.debugSession.vmService.addBreakpointWithScriptUri(this.ref.id, uri, bp.line, bp.column);
277 const vmBp: VMBreakpoint = (result.result as VMBreakpoint);
278 this.vmBps[uri]?.push(vmBp);
279 this.breakpoints[vmBp.id] = bp;
280 return vmBp;
281 } catch (e) {
282 logger.error(e, LogCategory.VmService);
283 return undefined;
284 }
285 }),
286 );
287 }
288
289 private gotPauseStart = false;
290 private initialBreakpoints = false;

Callers 3

setBreakpointsMethod · 0.45
setBreakPointsRequestFunction · 0.45

Calls 3

errorMethod · 0.65

Tested by

no test coverage detected