zed-industries/zed · error
Could not find a valid locator for a build task and configur
Error message
Could not find a valid locator for a build task and configure is invalid with error: {} What it means
During debug scenario resolution, a build task completed but no valid locator could pair its output with a debug configuration, and the 'configure' fallback was itself invalid — so the debugger cannot determine what to attach to.
Source
Thrown at crates/debugger_ui/src/session/running.rs:1241
let exit_status = terminal
.read_with(cx, |terminal, cx| terminal.wait_for_completed_task(cx))
.await
.context("Failed to wait for completed task")?;
if !exit_status.success() {
anyhow::bail!("Build failed");
}
Some((task.resolved.clone(), locator_name, extra_config))
} else {
None
};
if config_is_valid {
} else if let Some((task, locator_name, extra_config)) = build_output {
let locator_name =
locator_name.with_context(|| {
format!("Could not find a valid locator for a build task and configure is invalid with error: {}", request_type.err()
.map(|err| err.to_string())
.unwrap_or_default())
})?;
let request = dap_store
.update(cx, |this, cx| {
this.run_debug_locator(&locator_name, task, cx)
})?
.await?;
let zed_config = ZedDebugConfig {
label: label.clone(),
adapter: adapter.clone(),
request,
stop_on_entry: None,
};
let scenario = dap_registry
.adapter(&adapter)View on GitHub (pinned to f4178619ac)
Solutions
- Fix the debug scenario's configure block so it matches the build task's locator
- Ensure the build task defines a valid locator name
- Surface the underlying configuration error to the user in the debug UI
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/debugger_ui/src/session/running.rs:1241 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/04c03098bbf9dc43.
Report an issue: GitHub.