helix-editor/helix · error

No debug config with given name

Error message

No debug config with given name

What it means

:debug-start [name] matches `name` against the `name` fields of the language's [[language.debugger.templates]]; with no argument it takes templates.first(). If the templates array is empty, or no template's name matches exactly (matching is case-sensitive), dap_start_impl bails with 'No debug config with given name'.

Source

Thrown at helix-term/src/commands/dap.rs:150

    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
            .args
            .iter()
            .map(|(k, v)| (k.as_str(), map_value(v, &preprocessed_params)))
            .collect()
    } else {
        template
            .args
            .iter()
            .map(|(k, v)| (k.as_str(), v.clone()))
            .collect()
    };

    args.insert("cwd", to_value(helix_stdx::env::current_working_dir())?);

View on GitHub (pinned to 079a789e8c)

Solutions

  1. Run `:debug-start` with no argument to use the first template.
  2. Match the template's `name = "..."` field exactly — names are case-sensitive strings from languages.toml.
  3. Add or repair `[[language.debugger.templates]]` entries (name, request, args) in the language's debugger config.

Example fix

# before: called :debug-start launch, template named differently
[[language.debugger.templates]]
name = "debug"
# after — either rename the template or call :debug-start debug
[[language.debugger.templates]]
name = "launch"
Defensive patterns

Strategy: validation

Validate before calling

let names: Vec<_> = cfg.debugger.templates.iter().map(|t| t.name.as_str()).collect();
if !names.contains(&wanted) {
    // use templates.first() or report the valid names instead of calling :debug-start <wanted>
}

Prevention

When it happens

Trigger: `:debug-start launch` when the only template is `name = "debug"`; or a debugger block that defines `command`/`transport` but has no [[language.debugger.templates]] entries at all.

Common situations: Template names vary between users' shared configs; copy-pasted configs missing the templates section; case or spelling mismatches when typing the argument.

Related errors


AI-assisted analysis of helix-editor/helix@079a789e8c (2026-08-16). Data as JSON: /api/errors/3dc9c34af387d322. Report an issue: GitHub.