(logger: Logger, uri: string, breakpoints: DebugProtocol.SourceBreakpoint[])
| 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; |
no test coverage detected