( response: DebugProtocol.SetBreakpointsResponse, args: DebugProtocol.SetBreakpointsArguments, )
| 541 | } |
| 542 | |
| 543 | protected async setBreakPointsRequest( |
| 544 | response: DebugProtocol.SetBreakpointsResponse, |
| 545 | args: DebugProtocol.SetBreakpointsArguments, |
| 546 | ): Promise<void> { |
| 547 | if (this.noDebug) { |
| 548 | response.body = { breakpoints: (args.breakpoints || []).map((b) => ({ verified: false })) }; |
| 549 | this.sendResponse(response); |
| 550 | return; |
| 551 | } |
| 552 | |
| 553 | const source: DebugProtocol.Source = args.source; |
| 554 | const breakpoints: DebugProtocol.SourceBreakpoint[] = args.breakpoints || []; |
| 555 | |
| 556 | // Format the path correctly for the VM. |
| 557 | // TODO: The `|| source.name` stops a crash (#1566) but doesn't actually make |
| 558 | // the breakpoints work. This needs more work. |
| 559 | const uri = formatPathForVm(source.path || source.name!); |
| 560 | |
| 561 | try { |
| 562 | const result = await this.threadManager.setBreakpoints(uri, breakpoints); |
| 563 | const bpResponse = []; |
| 564 | for (const bpRes of result) { |
| 565 | bpResponse.push({ verified: !!bpRes }); |
| 566 | } |
| 567 | |
| 568 | response.body = { breakpoints: bpResponse }; |
| 569 | this.sendResponse(response); |
| 570 | } catch (error) { |
| 571 | this.errorResponse(response, `${error}`); |
| 572 | } |
| 573 | } |
| 574 | |
| 575 | protected async setExceptionBreakPointsRequest( |
| 576 | response: DebugProtocol.SetExceptionBreakpointsResponse, |
nothing calls this directly
no test coverage detected