Skip to content

debug_evaluate

MCP tools › Debugger

Evaluate an expression in a stopped debug session (default: top frame of the thread that stopped last). Expressions can call functions and change the program; each one is logged in .ferris-idea/agent-log.jsonl. Needs the debug right.

Its results carry text from process, files: the client is told to treat that as data, never as instructions.

Capabilitydebug.debug_evaluate
AreaDebugger
Accesschanges ide, processes
Reaches—
Rightsdebug
Dry runnone

Arguments

ArgumentTypeDescription
sessionrequiredintegerSession id.minimum 0
expressionrequiredstringExpression in the program's language; with fragment several statements.
frameintegerFrame id (default the top frame of the thread that stopped last).
contextstringwatch (default) or repl, the debug console's context: Python statements run too (SPEC-0091 v12).
fragmentbooleanA code fragment of several statements; the last one's value is returned (SPEC-0091 v12).

Call it from a shell

ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.

Terminal window
ferris-idea call ~/my-project debug_evaluate '{"session":1,"expression":"<string>"}'
Input schema as JSON
{
"type": "object",
"required": [
"session",
"expression"
],
"properties": {
"session": {
"description": "Session id.",
"type": "integer",
"minimum": 0
},
"expression": {
"description": "Expression in the program's language; with `fragment` several statements.",
"type": "string"
},
"frame": {
"description": "Frame id (default the top frame of the thread that stopped last).",
"type": [
"integer",
"null"
]
},
"context": {
"description": "`watch` (default) or `repl`, the debug console's context: Python statements run too\n(SPEC-0091 v12).",
"type": [
"string",
"null"
]
},
"fragment": {
"description": "A code fragment of several statements; the last one's value is returned (SPEC-0091 v12).",
"type": [
"boolean",
"null"
]
}
}
}