set_breakpoint
MCP tools › Debugger
Add, change or remove a saved breakpoint of this workspace: 1-based line with an optional condition, pass count (hit_condition), log message (logs instead of stopping) and enabled=false to keep it switched off; remove=true removes it; remove_all=true removes every breakpoint of path (.: of the whole workspace) and reports how many. dry_run defaults to true and returns the breakpoint as it would be saved. A window opened afterwards shows it; a window that is already open keeps its own list.
Its results carry text from files: the client is told to treat that as data, never as instructions.
| Capability | debug.set_breakpoint |
|---|---|
| Area | Debugger |
| Access | changes files |
| Reaches | — |
| Rights | write |
| Dry run | dry_run, on unless the call turns it off |
Arguments
| Argument | Type | Description |
|---|---|---|
pathrequired | string | Workspace-relative file. |
line | integer | 1-based line (not read with remove_all).default 0 · minimum 0 |
condition | string | Expression that must be true for the program to stop. |
hit_condition | string | Pass count: stop only on this hit. |
log_message | string | Log this message instead of stopping; {expr} parts are evaluated. |
enabled | boolean | false keeps the breakpoint but switches it off (default true). |
suspend | string | Which threads stop (SPEC-0127 v3): all, thread or none (log and go on); omitted:
as the debugger does. |
log_hit | boolean | Write "Breakpoint hit" with the place to the debug console. |
log_stack | boolean | Write the call stack to the debug console. |
remove_once_hit | boolean | Remove the breakpoint after its first hit. |
depends_on | string | Inactive until the breakpoint path:line (workspace-relative, 1-based) was hit. |
depends_keep | boolean | After that hit stay active (default false: wait for it again after each own hit). |
instance_filter | string | Only for these objects: ids as the values show them (33, 0x1f). |
class_filter | string | Only in these classes: patterns with *, - before one excludes it. |
caller_filter | string | Only when called from these methods (Class.method patterns, - excludes). |
remove | boolean | Remove the breakpoint instead (default false). |
remove_all | boolean | Remove every line breakpoint of path, or of the whole workspace when path is ., with
their properties; line is not read (SPEC-0127 v15 behaviour 32, default false). |
dry_run | boolean | Only return what would be saved (default true). |
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 set_breakpoint '{"path":"<string>"}'Input schema as JSON
{ "type": "object", "required": [ "path" ], "properties": { "path": { "description": "Workspace-relative file.", "type": "string" }, "line": { "description": "1-based line (not read with `remove_all`).", "type": "integer", "default": 0, "minimum": 0 }, "condition": { "description": "Expression that must be true for the program to stop.", "type": [ "string", "null" ] }, "hit_condition": { "description": "Pass count: stop only on this hit.", "type": [ "string", "null" ] }, "log_message": { "description": "Log this message instead of stopping; `{expr}` parts are evaluated.", "type": [ "string", "null" ] }, "enabled": { "description": "false keeps the breakpoint but switches it off (default true).", "type": [ "boolean", "null" ] }, "suspend": { "description": "Which threads stop (SPEC-0127 v3): `all`, `thread` or `none` (log and go on); omitted:\nas the debugger does.", "type": [ "string", "null" ] }, "log_hit": { "description": "Write \"Breakpoint hit\" with the place to the debug console.", "type": [ "boolean", "null" ] }, "log_stack": { "description": "Write the call stack to the debug console.", "type": [ "boolean", "null" ] }, "remove_once_hit": { "description": "Remove the breakpoint after its first hit.", "type": [ "boolean", "null" ] }, "depends_on": { "description": "Inactive until the breakpoint `path:line` (workspace-relative, 1-based) was hit.", "type": [ "string", "null" ] }, "depends_keep": { "description": "After that hit stay active (default false: wait for it again after each own hit).", "type": [ "boolean", "null" ] }, "instance_filter": { "description": "Only for these objects: ids as the values show them (`33`, `0x1f`).", "type": [ "string", "null" ] }, "class_filter": { "description": "Only in these classes: patterns with `*`, `-` before one excludes it.", "type": [ "string", "null" ] }, "caller_filter": { "description": "Only when called from these methods (`Class.method` patterns, `-` excludes).", "type": [ "string", "null" ] }, "remove": { "description": "Remove the breakpoint instead (default false).", "type": [ "boolean", "null" ] }, "remove_all": { "description": "Remove every line breakpoint of `path`, or of the whole workspace when `path` is `.`, with\ntheir properties; `line` is not read (SPEC-0127 v15 behaviour 32, default false).", "type": [ "boolean", "null" ] }, "dry_run": { "description": "Only return what would be saved (default true).", "type": [ "boolean", "null" ] } }}