Evaluate an expression
evaluateRuns JavaScript expressions in a paused or running Node.js debug session to inspect frame locals, call functions, mutate state, or await promises.
Instructions
Evaluate a JavaScript expression. While paused it runs in the chosen frame (default innermost) and can see locals; while running it runs in the global scope with require available (paths relative to the process cwd) and awaits promises. Side effects are allowed, so this can also mutate state or call functions. If the expression calls into code that hits a breakpoint, the pause is reported and the process stays paused there.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frame | No | Frame index to evaluate in (paused only). | |
| expression | Yes |