Debug a program
Ferris IDEA debugs through the Debug Adapter Protocol: one adapter per language, which you install once. The debugger, breakpoints with conditions, hit counts and log messages, watches and the Breakpoints dialog are Works.

Real frames of the application · ferris-idea drive, then ferris-idea drive screenshot after each step (docs/site/scripts/record-tour.py) · main build of v1.6.0, 2026-12-04 · throwaway Python demo project with a virtual environment; theme Ferris IDEA Dark
Before you start
Section titled “Before you start”Install the debug adapter for your language; each language page names the command.
| Language | Adapter | Install |
|---|---|---|
| Rust, C, C++, Swift | lldb-dap | Rust |
| Python | debugpy | Python |
| JavaScript, TypeScript | js-debug | JavaScript and TypeScript |
| Go | Delve | Go |
| Java | java-debug, inside jdtls | Java and Kotlin |
| Kotlin | kotlin-debug-adapter | Java and Kotlin |
On macOS, native programs and Go need Developer Mode: sudo DevToolsSecurity -enable.
Start a debug session
Section titled “Start a debug session”- Set a breakpoint: click a line number, or put the caret on the line and press ⌘F8 (Run › Toggle Line Breakpoint).
- Start the program under the debugger in one of these ways:
- Run › Debug Current File (⌃⇧D);
- Run › Debug (⌃D) for the selected configuration, or Run › Debug… (⌃⌥D) to pick one;
- the Debug button in Edit Configurations… or the run widget.
- Ferris IDEA picks the adapter from the command:
python→ debugpy,nodeand package scripts → js-debug,go runandgo test→ Delve,cargo run→ acargo build, then lldb-dap,javaand Maven’sexec:java→ java-debug. - The program stops at the breakpoint. The line is highlighted, and the Debug tool window (⌘5) opens with Threads & Variables and Console.
Step through code
Section titled “Step through code”The Debug toolbar and the Run menu have the same commands:
| Command | Key | What it does |
|---|---|---|
| Step Over | F8 | runs the current line, stops at the next |
| Step Into | F7 | goes into the function called on this line |
| Smart Step Into | ⇧F7 | asks which of the calls on the line to enter |
| Step Out | ⇧F8 | runs to the end of the current function |
| Run to Cursor | ⌥F9 | runs to the caret line |
| Resume Program | ⌥⌘R or F9 | runs to the next breakpoint |
| Pause Program | none | stops the program where it is |
| Stop | ⌘F2 | ends the session |
The ⋮ menu of the toolbar has more: Force Step Over and Into, Force Run to Cursor, Show Execution Point (⌥F10), Reset Frame, Step Out of Code Block, Resume and Pause All Threads, Get Thread Dump and Reload Changed Classes.
Read the state
Section titled “Read the state”- Frames: the call stack of the selected thread; library frames are folded into “n hidden frames”. Select a frame to see its variables. Java shows the thread with its state and group.
- Variables: expand objects and collections. The context menu has Set Value… (F2), Copy Value, Copy Name, Add to Watches, Inspect…, View as, and a renderer per type.
- Inline values: while paused, the editor shows the values of the variables a line uses after that line, in grey.
Evaluate an expression
Section titled “Evaluate an expression”- While paused, press ⌥F8 (Run › Evaluate Expression…). The focus goes to the field at the top of the Variables pane, “Evaluate (↩) · Watch (⇧⌘↩)”.
- Type an expression in the program’s language; completion helps. Press ↩. The result shows in the Variables pane, where you expand it like any variable.
- ⇧↩ switches to several lines (code fragment mode); evaluate them with ⌘↩. ↑ and ↓ step through earlier expressions.
For a quick look, put the caret on an expression in the editor and press
⌥⌘F8 (Quick Evaluate Expression): the value opens in a popup.
The debug console’s >>> line evaluates in the adapter’s own console as well.
Keep watches
Section titled “Keep watches”Press ⇧⌘↩ in the evaluate field, or choose Add to Watches in the editor’s or the Variables pane’s context menu. Watches are evaluated at every stop and kept for the next session.
Breakpoint properties
Section titled “Breakpoint properties”Right-click a breakpoint, or press ⇧⌘F8 on its line, for a small popup with Enabled, Suspend (all threads or this thread) and Condition. More opens the Breakpoints dialog (Run › View Breakpoints…), with every breakpoint grouped by kind and these properties:
| Property | Effect |
|---|---|
| Condition | stops only when the expression is true; ⇧↩ gives five lines |
| Pass count | stops on every n-th hit |
| Log message | writes a message to the console; {expression} parts are evaluated |
| Log “breakpoint hit” message, Log stack trace | write to the console at each hit |
| Remove once hit | a temporary breakpoint; also ⌥⇧⌘F8 or ⌥-click on a free line |
| Disable until hitting | waits for another breakpoint first |
| Instance, class and caller filters | stop only for matching objects or callers |
When an adapter cannot evaluate conditions, pass counts or log messages itself, Ferris IDEA does it at each stop. That is slower, and the debug console says so. A condition that fails to evaluate stops the program and the console names the error.
⌥-click on a breakpoint turns it off and on. Mute Breakpoints in the Debug toolbar skips all of them for the session.
Exception, method and field breakpoints
Section titled “Exception, method and field breakpoints”In the Breakpoints dialog:
- Exception Breakpoints per language (Java, Python, JavaScript, native, Go): stop on caught, uncaught or both, optionally only for named exception types (classes for Java).
- + Method Breakpoint (⌘N): stop on entry or exit of a function or method. ⌘F8 on a Java method header sets one directly.
- + Field Watchpoint (⇧⌘N), Java only: stop when a field is read, written or both. Add Field Watchpoint is also in the Variables menu.
Breakpoints are saved in the project’s .ferris-idea folder and come back when you reopen it.
When it does not work
Section titled “When it does not work”- “Cannot debug Language: … is not installed (…)”: the message names the install command or the folder the adapter goes into.
- A breakpoint is not hit and stays unverified: the adapter could not place it, for example on a line without code, or in a program built from another path or without debug information.
- The program runs past the breakpoint: the program that ran is not the one built from these sources, or breakpoints are muted.
Shortcuts
Section titled “Shortcuts”| Action | Shortcut |
|---|---|
| Debug | ⌘5Alt5 |
| Run › Debug | ⌃DShiftF9 |
| Run › Debug Current File | ⌃⇧Dno shortcut |
| Run › Evaluate Expression | ⌥F8AltF8 |
| Run › Quick Evaluate Expression | ⌥⌘F8CtrlAltF8 |
| Run › Resume Program | ⌥⌘R or F9F9 |
| Run › Run to Cursor | ⌥F9 or mouse:ForcetouchAltF9 |
| Run › Step Into | F7F7 |
| Run › Step Out | ⇧F8ShiftF8 |
| Run › Step Over | F8F8 |
| Run › Toggle Line Breakpoint | ⌘F8CtrlF8 |
| Run › View Breakpoints | ⇧⌘F8CtrlShiftF8 |
| Set valueXDebugger.SetValue | F2F2 |
| Show execution pointShowExecutionPoint | ⌥F10AltF10 |
| Smart step intoSmartStepInto | ⇧F7ShiftF7 |
| Toggle temporary line breakpointToggleTemporaryLineBreakpoint | ⌥⇧⌘F8CtrlShiftAltF8 |
For agents
Section titled “For agents”An agent debugs through the same sessions. Reading adapters and sessions needs no right; starting,
stepping and evaluating need debug, and starting also a trusted project; setting breakpoints
needs write; you grant rights per workspace.
debug_adaptersDebug adapters (Debug Adapter Protocol) Ferris IDEA knows: name, languages, start command when installed, and whether this machine lets a debugger run without a password prompt.debug_attachAttach a debugger to a running program: native (lldb-dap), python (debugpy), node (js-debug), java (JDWP) or go (Delve), bypidor debugport.debug_breakpointsThe line breakpoints of a debug session, and changing them while it goes on — stopped or running: withpathandbreakpointsthe file's line breakpoints are replaced by that list (line, condition, hit_condition, log_message, enabled; an empty list removes them all), as the Breakpoints dialog does for a running session; the saved breakpoints of the workspace stay as they are.debug_completionsCompletions the debug adapter offers for an expression in a stopped session (as in the Evaluate field):textwith the caret at its end or at 1-basedcolumn, inframe(default the top frame).debug_disassembleDisassembly of a stopped native debug session (DAP disassemble with symbols): fromaddress(hexadecimal with 0x; default the stopped thread's current instruction), startingbeforeinstructions ahead of it,countinstructions (default 32, at most 256).debug_evaluateEvaluate an expression in a stopped debug session (default: top frame of the thread that stopped last).debug_field_watchWatch a field of an object in a stopped debug session: the fieldnameof the structured valuereferencebecomes a field watchpoint (data breakpoint) that stops on writes (orread,readWrite); returns the adapter's id of the field, whichset_special_breakpointsfieldsalso takes.debug_hot_swapHot swap (Reload Changed Classes, SPEC-0091 v12): builds the changed workspace sourcesfilesfor a Java debug session (java-debug in jdtls) and reloads the changed classes into the running program; returns their names.debug_inspectInspect a value of a stopped debug session: the expression's value with its type, reference and first level of children, optionally in a view (hex,binary,char,decimalof an integer;text,elements,entriesevaluated as JavaString.valueOf/toArray()/entrySet().toArray()or Pythonstr/list), or withreferringthe objects that refer to it (Python's gc; refused by java-debug, which offers no such request).debug_memoryBytes of memory of a stopped native debug session (DAP readMemory):addresshexadecimal with 0x,countbytes (default 256, at most 4096;cappedwhen cut).debug_pausePause a running debug session's program (after debug_resume returned while it still ran) and return where it stopped, like debug_resume.debug_processesLocal processes of this user that a debugger can attach to: id, name, command line, runtime (native, python, node, java) and the debug port its command line opens (JDWP agent,node --inspect,debugpy --listen); processes with a debug port first.debug_registersThe registers of the top frame of a stopped native debug session (lldb-dap), by group as the adapter gives them (General Purpose Registers, …), at most 512 per group withleft_outbeyond.debug_renderersRenderers of the Debug window: how values of a type are shown, an expression in whichthis(Java) orself(Python) is the value, kept in.ferris-idea/debug-renderers.json.debug_reset_frameReset Frame: run a frame of a stopped debug session again from its start (default the top frame) and return where it stopped, like debug_resume.debug_resumeResume a debug session (continue,next,step_in,step_outon the thread that stopped last;force_nextsteps over without stopping at breakpoints;step_in_targetsteps into the calltargetfromdebug_step_targets) and wait for the next stop or the end;waitresumes nothing and only waits again, for a program that still ran when the last wait ended.debug_run_to_lineRun a stopped debug session's program to a line (Run to Cursor): a breakpoint is added there until the next stop, wherever that is.debug_sessionsThe debug sessions this server holds, oldest first: per sessionsession(the number the other debug tools take),stopped(true with thethreadthat stopped last; false while the program runs or after it ended — debug_resume withwaittells which),adapter(the debug adapter's id, e.g.debug_set_variableChange a local variable (or, withreference, a field of a structured variable) in a stopped debug session and return the value as the debugger now shows it.debug_startStart a debug session: native programs with lldb-dap, Go with Delve (go_testfor tests), Python with debugpy, Node.js/TypeScript scripts or annpm_scriptwith js-debug, or a Kotlinmain_class.debug_step_targetsList the calls on the stopped line that Smart Step Into can enter (id,label), fordebug_resumewithstep_in_target.debug_stopEnd a debug session: the program is terminated and the adapter stops.debug_threadsThe threads of a stopped debug session: id, name, state (Java: RUNNING, WAIT, MONITOR, NEW, ZOMBIE, read from the JVM; empty where the adapter cannot tell, e.g.debug_variablesChildren of a structured variable in a stopped debug session (struct fields, array elements) by its non-zero reference.saved_breakpointsBreakpoints saved for this workspace, as the editor's gutter and the Breakpoints dialog show them: file, 1-based line, condition, pass count (hit_condition), log message, enabled.set_breakpointAdd, 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.set_special_breakpointsException and method breakpoints of this workspace, as the Breakpoints dialog shows them: stop on caught and/or uncaught exceptions (optionally onlyexception_types), and on entry or exit of functions (a given list replaces the saved one).
No tool matches. Try fewer words, or .




![A popup below line 4 shows readings = [112.0, 98.5, 143.2, 120.7]](/ferris-idea/_astro/6-quick-evaluate.B4yqMjD7.webp)
