debug_set_variable
MCP tools › Debugger
Change a local variable (or, with reference, a field of a structured variable) in a stopped debug session and return the value as the debugger now shows it. Refused when the debug adapter cannot change values. 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.
| Capability | debug.debug_set_variable |
|---|---|
| Area | Debugger |
| Access | changes ide, processes |
| Reaches | — |
| Rights | debug |
| Dry run | none |
Arguments
| Argument | Type | Description |
|---|---|---|
sessionrequired | integer | Session id.minimum 0 |
namerequired | string | Name of the variable (or of the field within reference). |
valuerequired | string | New value in the program's language, e.g. 42. |
frame | integer | Frame id whose local variable is changed (default the top frame of the thread that stopped last). |
reference | integer | Reference of a structured variable whose field name is changed instead of a local. |
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.
ferris-idea call ~/my-project debug_set_variable '{"session":1,"name":"<string>","value":"<string>"}'Input schema as JSON
{ "type": "object", "required": [ "session", "name", "value" ], "properties": { "session": { "description": "Session id.", "type": "integer", "minimum": 0 }, "name": { "description": "Name of the variable (or of the field within `reference`).", "type": "string" }, "value": { "description": "New value in the program's language, e.g. `42`.", "type": "string" }, "frame": { "description": "Frame id whose local variable is changed (default the top frame of the thread that stopped\nlast).", "type": [ "integer", "null" ] }, "reference": { "description": "Reference of a structured variable whose field `name` is changed instead of a local.", "type": [ "integer", "null" ] } }}