Evaluate
debug_evaluateEvaluate a JavaScript expression inside a live Node.js process to inspect variables and test code, whether paused at a breakpoint or running normally.
Instructions
Evaluate a JavaScript expression. Uses Debugger.evaluateOnCallFrame when paused, otherwise Runtime.evaluate. Runs the target as the MCP user. launch executes a process; evaluate runs JavaScript inside it. Only use on a trusted local workspace. Inspector is bound to 127.0.0.1.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"expression": "<expression>"
},
"name": "debug_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | No | Session id from debug_launch/debug_attach. Required when more than one session is live. | |
| expression | Yes | JavaScript expression | |
| callFrameId | No | Call frame id when paused. Default: top frame |