MCP cdp_debugger_eval_frame
Description
Evaluates a JS expression scoped to a specific paused call frame via CDP Debugger.evaluateOnCallFrame -- sees that frame's locals and closures, not just globals. Get callFrameId from cdp_debugger_state's callFrames[].callFrameId while paused. Use this instead of cdp_eval specifically when you need access to a paused frame's own locals/closures, not because cdp_eval stops working -- it doesn't.
Delegates internally to debug_eval (after resolving callFrameId to a frameIndex via the native cdp_debugger_state route) -- the response uses debug_eval's shape (result.value/result.type, plus the richer result.variables for a container), not a raw CDP evaluateOnCallFrame RemoteObject.
Required parameters:
- callFrameId (string): From cdp_debugger_state's callFrames[].callFrameId.
- expression (string): JS expression to evaluate in that frame's scope.
Optional parameters:
- sessionId (string): Session id returned by cdp_session_create. Uses the active session when omitted.
Aliases
Alias of debug_eval; runtime="typescript"; Resolves callFrameId against the paused state to frameIndex; rejects missing or stale frame IDs.
See also
- Alias of MCP debug_eval
- HTTP cdpGetDebuggerState (
GET /api/cdp/debugger/state) - HTTP debugEval (
POST /api/debug/eval) - rk cdp debugger eval-frame
Parameters
additionalProperties: false
| Name | Type | Required | Values |
|---|---|---|---|
| callFrameId | string | Yes | |
| expression | string | Yes | |
| sessionId | string | No |
callFrameId
From cdp_debugger_state's callFrames[].callFrameId.
expression
JS expression to evaluate in that frame's scope.
sessionId
Session id returned by cdp_session_create. Uses the active session when omitted.
Updated about 4 hours ago