{"record":{"id":"3dc9c34af387d322","repo":"helix-editor/helix","slug":"no-debug-config-with-given-name","errorCode":null,"errorMessage":"No debug config with given name","messagePattern":"No debug config with given name","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"helix-term/src/commands/dap.rs","lineNumber":150,"sourceCode":"\n    let doc = doc!(cx.editor);\n    let config = doc\n        .language_config()\n        .and_then(|config| config.debugger.as_ref())\n        .ok_or_else(|| anyhow!(\"No debug adapter available for language\"))?;\n\n    let id = cx\n        .editor\n        .debug_adapters\n        .start_client(socket, config)\n        .map_err(|e| anyhow!(\"Failed to start debug client: {}\", e))?;\n\n    // TODO: avoid refetching all of this... pass a config in\n    let template = match name {\n        Some(name) => config.templates.iter().find(|t| t.name == name),\n        None => config.templates.first(),\n    }\n    .ok_or_else(|| anyhow!(\"No debug config with given name\"))?;\n\n    let mut args: HashMap<&str, Value> = if let Some(params) = params.as_ref() {\n        let preprocessed_params = prepare_dap_params(template, params);\n        template\n            .args\n            .iter()\n            .map(|(k, v)| (k.as_str(), map_value(v, &preprocessed_params)))\n            .collect()\n    } else {\n        template\n            .args\n            .iter()\n            .map(|(k, v)| (k.as_str(), v.clone()))\n            .collect()\n    };\n\n    args.insert(\"cwd\", to_value(helix_stdx::env::current_working_dir())?);\n","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/helix-editor/helix/blob/079a789e8cb08ead67f19e1971a1b7438b37354b/helix-term/src/commands/dap.rs#L132-L168","documentation":":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'.","triggerScenarios":"`: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.","commonSituations":"Template names vary between users' shared configs; copy-pasted configs missing the templates section; case or spelling mismatches when typing the argument.","solutions":["Run `:debug-start` with no argument to use the first template.","Match the template's `name = \"...\"` field exactly — names are case-sensitive strings from languages.toml.","Add or repair `[[language.debugger.templates]]` entries (name, request, args) in the language's debugger config."],"exampleFix":"# before: called :debug-start launch, template named differently\n[[language.debugger.templates]]\nname = \"debug\"\n# after — either rename the template or call :debug-start debug\n[[language.debugger.templates]]\nname = \"launch\"\n","handlingStrategy":"validation","validationCode":"let names: Vec<_> = cfg.debugger.templates.iter().map(|t| t.name.as_str()).collect();\nif !names.contains(&wanted) {\n    // use templates.first() or report the valid names instead of calling :debug-start <wanted>\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Derive template names from the same languages.toml you ship; never hardcode guesses.","Remember matching is case-sensitive exact equality on the `name` field."],"tags":["dap","debugging","config"],"backgroundTag":null,"analyzedSha":"079a789e8cb08ead67f19e1971a1b7438b37354b","analyzedAt":"2026-08-16T09:09:59.668Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}