Open-Source Wikis

/

Zed

/

Features

/

Debugger

zed-industries/zed

Debugger

Active contributors: Anthony-Eid, kubkon, osiewicz

Purpose

A built-in DAP-based debugger for any language with a DAP adapter. Breakpoints, conditional breakpoints, log points, stepping, watch expressions, REPL, and a structured variables tree. Configuration lives in JSON next to tasks.

This is the user-visible surface of the DAP system.

What you can do

  • Set breakpoints in any open buffer (gutter clicks or editor: toggle breakpoint).
  • Configure conditional breakpoints (debugger: edit breakpoint condition).
  • Log breakpoints (print to console without halting).
  • Start sessions with adapter-specific configurations (Run / Debug / Attach / Test).
  • Step over / into / out / back.
  • Inspect the call stack, locals, and watch expressions.
  • Evaluate expressions in the REPL panel.
  • View raw DAP traffic via crates/debugger_tools.

Where it lives

Crate Responsibility
crates/dap DAP client
crates/dap_adapters Per-language adapters (lldb, codelldb, dlv, js-debug, …)
crates/debugger_ui Panels: breakpoints, stack, variables, REPL, run controls
crates/debugger_tools DAP traffic inspector
crates/debug_adapter_extension Extension API surface
crates/project (debugger.rs and friends) DebuggerStore per project

How a session runs

graph TD
    User[User clicks Run / Debug] --> DP[DebuggerPanel]
    DP --> DS[DebuggerStore]
    DS --> A[DebugAdapter]
    A --> P[Adapter process]
    P --> Tgt[Target process]
    A --> DS
    DS --> DP
    DP --> Ed[Editor: gutter highlights]
    DP --> Vars[Variables panel]
    DP --> Stack[Call-stack panel]
    DP --> Console[Debug console / REPL]

Configuration

Debug configurations live in tasks.json (or a sibling debug.json). Schema is validated by crates/dap_adapters.

Inline UI

The editor shows:

  • Breakpoint markers in the gutter.
  • A current-line highlight on the active stack frame.
  • Inline variable values at the cursor's frame (configurable).
  • Hover popovers with expression evaluations while paused.

Adapter installation

Adapters are installed similarly to LSP servers. Many use the project Node runtime; others (e.g. lldb) require a system binary.

Extensions

Third-party debug adapters can ship as Zed extensions through crates/debug_adapter_extension — same model as language servers.

Entry points for modification

  • New adapter — crates/dap_adapters/src/<adapter>.rs or as an extension.
  • New panel — crates/debugger_ui/src/.
  • DAP message handling — crates/dap/src/.
  • Inline value rendering — crates/editor/src/... plus crates/debugger_ui integration.
  • DAP — the underlying system
  • Editor — gutter / inline-value integration

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Debugger – Zed wiki | Factory