zed-industries/zed · error

cannot initialize, still building

Error message

cannot initialize, still building

What it means

initialize_sequence was invoked while the session is in the Booting state rather than Running; the DAP initialization handshake cannot begin until the adapter binary has been resolved/started. The session should call initialize_sequence again after boot completes.

Source

Thrown at crates/project/src/debugger/session.rs:1327

                        return Ok(());
                    }
                }
            }
        })
    }

    pub(super) fn initialize_sequence(
        &mut self,
        initialize_rx: oneshot::Receiver<()>,
        dap_store: WeakEntity<DapStore>,
        cx: &mut Context<Self>,
    ) -> Task<Result<()>> {
        match &self.state {
            SessionState::Running(local_mode) => {
                local_mode.initialize_sequence(&self.capabilities, initialize_rx, dap_store, cx)
            }
            SessionState::Booting(_) => {
                Task::ready(Err(anyhow!("cannot initialize, still building")))
            }
        }
    }

    pub fn run_to_position(
        &mut self,
        breakpoint: SourceBreakpoint,
        active_thread_id: ThreadId,
        cx: &mut Context<Self>,
    ) {
        match &mut self.state {
            SessionState::Running(local_mode) => {
                if !matches!(
                    self.active_snapshot
                        .thread_states
                        .thread_state(active_thread_id),
                    Some(ThreadStatus::Stopped)
                ) {

View on GitHub (pinned to 9d272b0363)

Solutions

  1. Retry initialization once the boot task finishes and the state transitions to Running
  2. Investigate why the boot is stuck if the state never advances (failed download, build error)
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/project/src/debugger/session.rs:1327 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-08-20). Data as JSON: /api/errors/7784efcd8d8d7f60. Report an issue: GitHub.