zed-industries/zed · critical
not implemented
Error message
not implemented
What it means
This is Rust's unimplemented!() macro: executing it panics with 'not implemented'. Session::set_ignore_breakpoints only implements propagation for a running local session (as_running() -> local.send_source_breakpoints); for every other state the code deliberately panics, with an adjacent todo acknowledging that propagation to downstream/upstream sessions was never written.
Source
Thrown at crates/project/src/debugger/session.rs:2009
self.set_ignore_breakpoints(!self.ignore_breakpoints, cx)
}
pub(crate) fn set_ignore_breakpoints(
&mut self,
ignore: bool,
cx: &mut App,
) -> Task<HashMap<Arc<Path>, anyhow::Error>> {
if self.ignore_breakpoints == ignore {
return Task::ready(HashMap::default());
}
self.ignore_breakpoints = ignore;
if let Some(local) = self.as_running() {
local.send_source_breakpoints(ignore, &self.breakpoint_store, cx)
} else {
// todo(debugger): We need to propagate this change to downstream sessions and send a message to upstream sessions
unimplemented!()
}
}
pub fn data_breakpoints(&self) -> impl Iterator<Item = &DataBreakpointState> {
self.data_breakpoints.values()
}
pub fn exception_breakpoints(
&self,
) -> impl Iterator<Item = &(ExceptionBreakpointsFilter, IsEnabled)> {
self.exception_breakpoints.values()
}
pub fn toggle_exception_breakpoint(&mut self, id: &str, cx: &App) {
if let Some((_, is_enabled)) = self.exception_breakpoints.get_mut(id) {
*is_enabled = !*is_enabled;
self.send_exception_breakpoints(cx);
}View on GitHub (pinned to bc538def45)
Solutions
- As a user: restart the debug session, then toggle ignore-breakpoints again
- As a caller: guard the call with the session's running state (as_running().is_some()) and skip when not running
- Upstream fix: replace unimplemented!() with Task::ready(HashMap::default()) (flag already stored, synced on next launch) or propagate an Err instead of panicking
Example fix
// before
if let Some(local) = self.as_running() {
local.send_source_breakpoints(ignore, &self.breakpoint_store, cx)
} else {
unimplemented!()
}
// after
if let Some(local) = self.as_running() {
local.send_source_breakpoints(ignore, &self.breakpoint_store, cx)
} else {
// Flag is stored; it will be applied when a session next runs.
Task::ready(HashMap::default())
} Defensive patterns
Strategy: type-guard
Validate before calling
// Only propagate the flag while a local session is actually running
let has_running = session.as_running().is_some();
if has_running && session.ignore_breakpoints() != ignore {
session.set_ignore_breakpoints(ignore, cx);
} Type guard
fn can_sync_breakpoints(session: &debugger::Session) -> bool {
// set_ignore_breakpoints only implements the running-local path;
// everything else hits unimplemented!().
session.as_running().is_some()
} Try / catch
// Rust: this is a panic, not a Result — catch_unwind only as a last resort
use std::panic::{catch_unwind, AssertUnwindSafe};
let outcome = catch_unwind(AssertUnwindSafe(|| {
session.set_ignore_breakpoints(ignore, cx)
}));
if outcome.is_err() {
log::error!("set_ignore_breakpoints panicked; session not running?");
} Prevention
- Never call state-mutating debugger APIs on sessions you have not verified are running
- Gate UI toggles on the debugger's running state and disable them otherwise
- Upstream: replace unimplemented!() with a no-op task or an Err — a todo comment is not a crash guard
When it happens
Trigger: Calling set_ignore_breakpoints(ignore) with a new value while the session has no running local debug adapter — debuggee already terminated, session stopped/deferred before launch, or a remote/attached session — hits the else branch and panics.
Common situations: Toggling the breakpoints-enabled switch in the debugger UI right after the debuggee exits or before it starts; a race where the session stops between the ignore flag check and the as_running() call; scripted or extension-driven breakpoint toggles on non-running sessions.
Related errors
- output token limit reached
- message not found
- not supported
- cannot capture writable sandbox path `{}`
- cannot re-verify approved sandbox write grant `{}` (if the d
AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16).
Data as JSON: /api/errors/bc5615d30066d8d3.
Report an issue: GitHub.