Skip to content

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.

Capabilitydebug.set_breakpoint
AreaDebugger
Accesschanges files
Reaches—
Rightswrite
Dry rundry_run, on unless the call turns it off

Arguments

ArgumentTypeDescription
pathrequiredstringWorkspace-relative file.
lineinteger1-based line (not read with remove_all).default 0 · minimum 0
conditionstringExpression that must be true for the program to stop.
hit_conditionstringPass count: stop only on this hit.
log_messagestringLog this message instead of stopping; {expr} parts are evaluated.
enabledbooleanfalse keeps the breakpoint but switches it off (default true).
suspendstringWhich threads stop (SPEC-0127 v3): all, thread or none (log and go on); omitted: as the debugger does.
log_hitbooleanWrite "Breakpoint hit" with the place to the debug console.
log_stackbooleanWrite the call stack to the debug console.
remove_once_hitbooleanRemove the breakpoint after its first hit.
depends_onstringInactive until the breakpoint path:line (workspace-relative, 1-based) was hit.
depends_keepbooleanAfter that hit stay active (default false: wait for it again after each own hit).
instance_filterstringOnly for these objects: ids as the values show them (33, 0x1f).
class_filterstringOnly in these classes: patterns with *, - before one excludes it.
caller_filterstringOnly when called from these methods (Class.method patterns, - excludes).
removebooleanRemove the breakpoint instead (default false).
remove_allbooleanRemove 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_runbooleanOnly 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.

Terminal window
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"
]
}
}
}