{"record":{"id":"04c03098bbf9dc43","repo":"zed-industries/zed","slug":"could-not-find-a-valid-locator-for-a-build-task-an","errorCode":null,"errorMessage":"Could not find a valid locator for a build task and configure is invalid with error: {}","messagePattern":"Could not find a valid locator for a build task and configure is invalid with error: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/debugger_ui/src/session/running.rs","lineNumber":1241,"sourceCode":"\n                let exit_status = terminal\n                    .read_with(cx, |terminal, cx| terminal.wait_for_completed_task(cx))\n                    .await\n                    .context(\"Failed to wait for completed task\")?;\n\n                if !exit_status.success() {\n                    anyhow::bail!(\"Build failed\");\n                }\n                Some((task.resolved.clone(), locator_name, extra_config))\n            } else {\n                None\n            };\n\n            if config_is_valid {\n            } else if let Some((task, locator_name, extra_config)) = build_output {\n                let locator_name =\n                    locator_name.with_context(|| {\n                        format!(\"Could not find a valid locator for a build task and configure is invalid with error: {}\", request_type.err()\n                            .map(|err| err.to_string())\n                            .unwrap_or_default())\n                    })?;\n                let request = dap_store\n                    .update(cx, |this, cx| {\n                        this.run_debug_locator(&locator_name, task, cx)\n                    })?\n                    .await?;\n\n                let zed_config = ZedDebugConfig {\n                    label: label.clone(),\n                    adapter: adapter.clone(),\n                    request,\n                    stop_on_entry: None,\n                };\n\n                let scenario = dap_registry\n                    .adapter(&adapter)","sourceCodeStart":1223,"sourceCodeEnd":1259,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/debugger_ui/src/session/running.rs#L1223-L1259","documentation":"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.","triggerScenarios":"Thrown at crates/debugger_ui/src/session/running.rs:1241 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}