MCPcopy Create free account
hub / github.com/Snapchat/Valdi / evaluate

Method evaluate

valdi/vscode_debugger/src/adapter/evaluator.ts:128–137  ·  view source on GitHub ↗
(
    params: Cdp.Debugger.EvaluateOnCallFrameParams | Cdp.Runtime.EvaluateParams,
  )

Source from the content-addressed store, hash-verified

126 ): Promise<Cdp.Debugger.EvaluateOnCallFrameResult>;
127 public evaluate(params: Cdp.Runtime.EvaluateParams): Promise<Cdp.Runtime.EvaluateResult>;
128 public async evaluate(
129 params: Cdp.Debugger.EvaluateOnCallFrameParams | Cdp.Runtime.EvaluateParams,
130 ) {
131 // no call frame means there will not be any relevant $returnValue to reference
132 if (!('callFrameId' in params)) {
133 return this.cdp.Runtime.evaluate(params);
134 }
135
136 return this.prepare(params.expression).invoke(params);
137 }
138
139 /**
140 * Hoists the return value of the expression to the `globalThis`.

Callers

nothing calls this directly

Calls 3

prepareMethod · 0.95
evaluateMethod · 0.65
invokeMethod · 0.45

Tested by

no test coverage detected