{"record":{"id":"471af1201dbde9ed","repo":"helix-editor/helix","slug":"command-not-provided","errorCode":null,"errorMessage":"Command not provided","messagePattern":"Command not provided","errorType":"validation","errorClass":"helix_dap::Error","httpStatus":null,"severity":"error","filePath":"helix-dap/src/client.rs","lineNumber":63,"sourceCode":"    /// Currently active frame for the current thread.\n    pub active_frame: Option<usize>,\n    pub quirks: DebuggerQuirks,\n    /// The config which was used to start this debugger.\n    pub config: Option<DebugAdapterConfig>,\n}\n\nimpl Client {\n    // Spawn a process and communicate with it by either TCP or stdio\n    // The returned stream includes the Client ID so consumers can differentiate between multiple clients\n    pub async fn process(\n        transport: &str,\n        command: &str,\n        args: Vec<&str>,\n        port_arg: Option<&str>,\n        id: DebugAdapterId,\n    ) -> Result<(Self, UnboundedReceiver<(DebugAdapterId, Payload)>)> {\n        if command.is_empty() {\n            return Result::Err(Error::Other(anyhow!(\"Command not provided\")));\n        }\n        match (transport, port_arg) {\n            (\"tcp\", Some(port_arg)) => Self::tcp_process(command, args, port_arg, id).await,\n            (\"stdio\", _) => Self::stdio(command, args, id),\n            _ => Result::Err(Error::Other(anyhow!(\"Incorrect transport {}\", transport))),\n        }\n    }\n\n    pub fn streams(\n        rx: Box<dyn AsyncBufRead + Unpin + Send>,\n        tx: Box<dyn AsyncWrite + Unpin + Send>,\n        err: Option<Box<dyn AsyncBufRead + Unpin + Send>>,\n        id: DebugAdapterId,\n        process: Option<Child>,\n    ) -> Result<(Self, UnboundedReceiver<(DebugAdapterId, Payload)>)> {\n        let (server_rx, server_tx) = Transport::start(rx, tx, err, id);\n        let (client_tx, client_rx) = unbounded_channel();\n","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/helix-editor/helix/blob/079a789e8cb08ead67f19e1971a1b7438b37354b/helix-dap/src/client.rs#L45-L81","documentation":"Returned by helix_dap::Client::process when the debug adapter's launch 'command' string is empty. The function is the single entry point that spawns a DAP adapter process (via stdio or TCP), and it refuses to spawn anything when no executable is configured. The debug config (command/args/transport) comes from the debugger entry in languages.toml or the config passed to the debug request.","triggerScenarios":"Starting a debug session (:debug or launch/debug templated config) where the resolved debug configuration has an empty or missing 'command' field — e.g. a [[language.debuggers]] block or user debug config without command = \"...\", or a template whose {command} variable resolves to an empty string.","commonSituations":"Copied a debugger config from docs but omitted the command line; used a templated debug config (e.g. lldb-dap vs codelldb) where the variable substitution produced an empty value; configured only transport/port for a server-style adapter but the client still requires the executable that launches it.","solutions":["Set a non-empty command in your debug config: [[language.debuggers]] blocks in languages.toml or your debug config entry, e.g. command = \"lldb-dap\"","Verify the template variables used in templated configs actually resolve (check for empty substitution) before launching","Ensure the command is on PATH or use an absolute path","If you intended to attach to an already-running TCP server, note Client::process still spawns the process that provides the port; use the attach/request type of your adapter accordingly"],"exampleFix":"# before (languages.toml / debug config)\n[[language.debuggers]]\nname = \"rust\"\ntransport = \"stdio\"\n# command missing -> \"Command not provided\"\n\n# after\n[[language.debuggers]]\nname = \"rust\"\ncommand = \"lldb-dap\"\ntransport = \"stdio\"","handlingStrategy":"validation","validationCode":"// Validate debug config before starting the session\nfn validate_debug_config(cfg: &DebugConfig) -> Result<(), String> {\n    if cfg.command.trim().is_empty() {\n        return Err(\"debug config field 'command' is empty\".into());\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":"match dap::Client::process(transport, &command, args, port_arg, id).await {\n    Ok((client, events)) => { /* ... */ }\n    Err(e) => editor.set_error(format!(\"failed to start debugger: {e}\")), // surfaces 'Command not provided'\n}","preventionTips":["Always set 'command' in [[language.debuggers]] / debug templates","Test templated configs resolve to non-empty command before :debug","Keep a known-good debug config committed per project and copy from it"],"tags":["rust","helix","dap","debugging","config"],"backgroundTag":null,"analyzedSha":"079a789e8cb08ead67f19e1971a1b7438b37354b","analyzedAt":"2026-08-16T09:09:59.668Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}