(path, line, text)
| 556 | } |
| 557 | |
| 558 | onBroken(path, line, text) { |
| 559 | // Auto-continue for non-interactive connections (e.g., mcsim) |
| 560 | if (!this.interactive) { |
| 561 | this.doGo(); |
| 562 | return; |
| 563 | } |
| 564 | |
| 565 | this.broken = true; |
| 566 | this.running = false; |
| 567 | |
| 568 | if (path) { |
| 569 | this.currentPath = path; |
| 570 | this.knownPaths.add(path); |
| 571 | } |
| 572 | if (line) |
| 573 | this.currentLine = line; |
| 574 | |
| 575 | // Handle temporary breakpoint (until command) |
| 576 | if (this.temporaryBreakpoint) { |
| 577 | const temporaryBreakpoint = this.temporaryBreakpoint; |
| 578 | this.doClearBreakpoint(temporaryBreakpoint.path, temporaryBreakpoint.line); |
| 579 | // Remove from user breakpoints if it was added there |
| 580 | const i = this.breakpoints.findIndex(bp => bp.path === temporaryBreakpoint.path && bp.line === temporaryBreakpoint.line); |
| 581 | if (i >= 0) |
| 582 | this.breakpoints.splice(i, 1); |
| 583 | delete this.temporaryBreakpoint; |
| 584 | } |
| 585 | |
| 586 | this.clearLine(); |
| 587 | |
| 588 | const msg = text ? text.replace(/\n$/, '') : ''; |
| 589 | if (this.onBreakpointHit) this.onBreakpointHit(); |
| 590 | |
| 591 | this.report('stopped', { |
| 592 | path: this.currentPath ?? '', |
| 593 | line: this.currentLine ?? 0, |
| 594 | reason: msg |
| 595 | }, undefined, (data) => { |
| 596 | this.printLocation(data.reason); |
| 597 | this.showPrompt(); |
| 598 | }); |
| 599 | } |
| 600 | |
| 601 | onLogged(path, line, data) { |
| 602 | this.log += data; |
nothing calls this directly
no test coverage detected