(callFrameId, probeIndex, location)
| 677 | } |
| 678 | |
| 679 | async evaluateProbe(callFrameId, probeIndex, location) { |
| 680 | if (this.finished) { return; } |
| 681 | const probe = this.probes[probeIndex]; |
| 682 | const evaluation = await this.callCdp( |
| 683 | 'Debugger.evaluateOnCallFrame', |
| 684 | { callFrameId, expression: probe.expr, generatePreview: true }, |
| 685 | { __proto__: null, index: probeIndex, location }, |
| 686 | ); |
| 687 | this.lastProbeIndex = probeIndex; |
| 688 | |
| 689 | probe.hits++; |
| 690 | const result = { probe: probeIndex, event: 'hit', hit: probe.hits, location }; |
| 691 | if (evaluation.exceptionDetails !== undefined) { |
| 692 | result.error = { |
| 693 | __proto__: null, |
| 694 | message: evaluation.result?.description ?? 'Probe expression failed', |
| 695 | details: { __proto__: null, exception: trimRemoteObject(evaluation.exceptionDetails) }, |
| 696 | }; |
| 697 | } else { |
| 698 | result.result = trimRemoteObject(evaluation.result); |
| 699 | } |
| 700 | ArrayPrototypePush(this.results, result); |
| 701 | } |
| 702 | |
| 703 | async resume() { |
| 704 | if (this.finished) { return; } |
no test coverage detected