helix-editor/helix · error
No debug adapter available for language
Error message
No debug adapter available for language
What it means
dap_start_impl (commands/dap.rs) resolves the current document's language config and requires a `debugger` section (with templates) from languages.toml: doc.language_config().and_then(|c| c.debugger.as_ref()). A scratch/unnamed buffer, an unrecognized file type, or a language whose entry has no debugger configuration makes this None, so :debug-start/:debug-remote fail before any adapter process is spawned. A separate workspace-trust bail fires earlier if the workspace is untrusted.
Source
Thrown at helix-term/src/commands/dap.rs:137
socket: Option<std::net::SocketAddr>,
params: Option<Vec<std::borrow::Cow<str>>>,
) -> Result<(), anyhow::Error> {
// Refuse to spawn a debug adapter in workspace trust restricted mode.
let workspace = doc!(cx.editor).workspace_root().to_path_buf();
if !cx
.editor
.workspace_trust
.query(&workspace, helix_loader::workspace_trust::TrustQuery::Dap)
.is_trusted()
{
bail!("Workspace is not trusted. Run `:workspace-trust` to enable the debug adapter.");
}
let doc = doc!(cx.editor);
let config = doc
.language_config()
.and_then(|config| config.debugger.as_ref())
.ok_or_else(|| anyhow!("No debug adapter available for language"))?;
let id = cx
.editor
.debug_adapters
.start_client(socket, config)
.map_err(|e| anyhow!("Failed to start debug client: {}", e))?;
// TODO: avoid refetching all of this... pass a config in
let template = match name {
Some(name) => config.templates.iter().find(|t| t.name == name),
None => config.templates.first(),
}
.ok_or_else(|| anyhow!("No debug config with given name"))?;
let mut args: HashMap<&str, Value> = if let Some(params) = params.as_ref() {
let preprocessed_params = prepare_dap_params(template, params);
template
.argsView on GitHub (pinned to 079a789e8c)
Solutions
- Run `hx --health <lang>` — it shows the configured debug adapters; no adapter listed means no DAP config exists.
- Add a `[language.debugger]` block with at least one `[[language.debugger.templates]]` entry to your languages.toml override for that language.
- Make sure the buffer is recognized: `:set-language <lang>` for a scratch file, or open the real file from disk.
Example fix
# ~/.config/helix/languages.toml — after (before: no debugger block) [language.debugger] command = "lldb-dap" transport = "stdio" [[language.debugger.templates]] name = "binary" request = "launch"
Defensive patterns
Strategy: type-guard
Validate before calling
let has_dap = doc
.language_config()
.and_then(|c| c.debugger.as_ref())
.map(|d| !d.templates.is_empty())
.unwrap_or(false);
if !has_dap { /* skip :debug-start, show hint instead */ } Type guard
fn has_debugger(doc: &helix_view::Document) -> bool {
doc.language_config()
.and_then(|c| c.debugger.as_ref())
.is_some()
} Prevention
- Check `hx --health <lang>` for debug-adapter entries before binding :debug-start.
- Keep debugger config per-language in languages.toml overrides and test after edits.
When it happens
Trigger: `:debug-start` in a new scratch buffer, a Markdown/log file, or a language whose languages.toml entry has no [language.debugger] block — most languages ship none by default.
Common situations: Assuming IDE-style debugging works out of the box; forgetting that DAP configs are per-language and largely user-supplied; running the command in a buffer whose file type was not detected.
Related errors
- Command not provided
- Incorrect transport {}
- DAP request failed
- Failed to start debug client: {}
- No debug config with given name
AI-assisted analysis of helix-editor/helix@079a789e8c (2026-08-16).
Data as JSON: /api/errors/86989fdb1368cc6e.
Report an issue: GitHub.