MCPcopy Create free account
hub / github.com/nodejs/node / evaluateProbe

Method evaluateProbe

lib/internal/debugger/inspect_probe.js:679–701  ·  view source on GitHub ↗
(callFrameId, probeIndex, location)

Source from the content-addressed store, hash-verified

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; }

Callers 1

handlePausedMethod · 0.95

Calls 2

callCdpMethod · 0.95
trimRemoteObjectFunction · 0.85

Tested by

no test coverage detected