{"record":{"id":"8c04dcd8e371cc4a","repo":"zed-industries/zed","slug":"when-using-the-stdio-transport-the-path-to-a-de","errorCode":null,"errorMessage":"When using the `stdio` transport, the path to a debug adapter binary must be set by Zed.","messagePattern":"When using the `stdio` transport, the path to a debug adapter binary must be set by Zed\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dap/src/transport.rs","lineNumber":662,"sourceCode":"            p.kill().log_err();\n        }\n    }\n}\n\npub struct StdioTransport {\n    process: Mutex<Child>,\n    _stderr_task: Option<Task<()>>,\n}\n\nimpl StdioTransport {\n    // #[allow(dead_code, reason = \"This is used in non test builds of Zed\")]\n    async fn start(\n        binary: &DebugAdapterBinary,\n        log_handlers: LogHandlers,\n        cx: &mut AsyncApp,\n    ) -> Result<Self> {\n        let Some(binary_command) = &binary.command else {\n            bail!(\n                \"When using the `stdio` transport, the path to a debug adapter binary must be set by Zed.\"\n            );\n        };\n        let mut command = util::command::new_std_command(&binary_command);\n\n        if let Some(cwd) = &binary.cwd {\n            command.current_dir(cwd);\n        }\n\n        command.args(&binary.arguments);\n        command.envs(&binary.envs);\n\n        let mut process = Child::spawn(command, Stdio::piped(), Stdio::piped(), Stdio::piped())?;\n\n        let _stderr_task = process.stderr.take().map(|stderr| {\n            cx.background_spawn(TransportDelegate::handle_adapter_log(\n                stderr,\n                IoKind::StdErr,","sourceCodeStart":644,"sourceCodeEnd":680,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/dap/src/transport.rs#L644-L680","documentation":"StdioTransport::start requires DebugAdapterBinary.command to be Some - the executable to spawn for the adapter. When a debug configuration selects the stdio transport but no command was resolved (user config gave none and Zed could not install/locate the adapter), this bail fires before any process is created. It is effectively an invariant: stdio transport without a binary path is unusable.","triggerScenarios":"A debug adapter config declares transport 'stdio' while its Adapter implementation returned a DebugAdapterBinary with command: None - typically a custom adapter in Zed's debug settings that has neither an explicit command nor a Zed-managed install; or an adapter's install/resolution logic silently returned no binary.","commonSituations":"Hand-written adapter entries in Zed settings that set only host/port or nothing; adapter download failed earlier and left no cached binary; adapter name typo so no built-in implementation matches and command stays unset.","solutions":["Set an explicit command (absolute path) plus arguments/envs in the adapter configuration so command is Some","Fix the adapter name so Zed's built-in installer can fetch/locate the binary","Pre-install the adapter and point the config at the installed executable","If you meant to attach to an already-running server, use the tcp transport instead of stdio"],"exampleFix":"// before: stdio transport with no command\n\"debug\": { \"adapters\": { \"mytool\": { \"request\": \"launch\" } } }\n\n// after: give the stdio transport a concrete binary\n\"debug\": {\n  \"adapters\": {\n    \"mytool\": {\n      \"command\": \"/usr/local/bin/mytool-dap\",\n      \"args\": [\"--stdio\"],\n      \"request\": \"launch\"\n    }\n  }\n}","handlingStrategy":"validation","validationCode":"// Before building the transport, assert the invariant yourself\nlet command = binary\n    .command\n    .as_ref()\n    .map(|c| c.to_string_lossy().into_owned())\n    .with_context(|| format!(\"stdio transport requires a binary command; got binary {binary:?}\"))?;","typeGuard":"fn has_stdio_command(binary: &DebugAdapterBinary) -> bool {\n    binary.command.is_some()\n}","tryCatchPattern":null,"preventionTips":["Always set command (and arguments/envs) for stdio adapters in settings","Validate adapter configs at load time and reject stdio entries without a command early"],"tags":["dap","stdio","configuration","missing-binary","debug-adapter","rust"],"backgroundTag":"missing-debug-adapter-binary","analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}