{"record":{"id":"7784efcd8d8d7f60","repo":"zed-industries/zed","slug":"cannot-initialize-still-building","errorCode":null,"errorMessage":"cannot initialize, still building","messagePattern":"cannot initialize, still building","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/project/src/debugger/session.rs","lineNumber":1327,"sourceCode":"                        return Ok(());\n                    }\n                }\n            }\n        })\n    }\n\n    pub(super) fn initialize_sequence(\n        &mut self,\n        initialize_rx: oneshot::Receiver<()>,\n        dap_store: WeakEntity<DapStore>,\n        cx: &mut Context<Self>,\n    ) -> Task<Result<()>> {\n        match &self.state {\n            SessionState::Running(local_mode) => {\n                local_mode.initialize_sequence(&self.capabilities, initialize_rx, dap_store, cx)\n            }\n            SessionState::Booting(_) => {\n                Task::ready(Err(anyhow!(\"cannot initialize, still building\")))\n            }\n        }\n    }\n\n    pub fn run_to_position(\n        &mut self,\n        breakpoint: SourceBreakpoint,\n        active_thread_id: ThreadId,\n        cx: &mut Context<Self>,\n    ) {\n        match &mut self.state {\n            SessionState::Running(local_mode) => {\n                if !matches!(\n                    self.active_snapshot\n                        .thread_states\n                        .thread_state(active_thread_id),\n                    Some(ThreadStatus::Stopped)\n                ) {","sourceCodeStart":1309,"sourceCodeEnd":1345,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/project/src/debugger/session.rs#L1309-L1345","documentation":"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.","triggerScenarios":"Thrown at crates/project/src/debugger/session.rs:1327 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry initialization once the boot task finishes and the state transitions to Running","Investigate why the boot is stuck if the state never advances (failed download, build error)"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}