go-delve/delve · error
%q is not a configuration parameter
Error message
%q is not a configuration parameter
What it means
DAP's 'config <name> ...' REPL command resolves <name> against the launchAttachArgs struct fields via reflection (ConfigureFindFieldByName using the cfgName tag). If no matching, settable field is found, field is the zero reflect.Value and !field.CanAddr() is true, yielding this error. It means the configuration name does not correspond to any DAP session parameter.
Source
Thrown at service/dap/config.go:29
func listConfig(args *launchAttachArgs) string {
var buf bytes.Buffer
config.ConfigureList(&buf, args, "cfgName")
return buf.String()
}
func configureSet(sargs *launchAttachArgs, args string) (bool, string, error) {
v := config.Split2PartsBySpace(args)
cfgname := v[0]
var rest string
if len(v) == 2 {
rest = v[1]
}
field := config.ConfigureFindFieldByName(sargs, cfgname, "cfgName")
if !field.CanAddr() {
return false, "", fmt.Errorf("%q is not a configuration parameter", cfgname)
}
if cfgname == "substitutePath" {
err := configureSetSubstitutePath(sargs, rest)
if err != nil {
return false, "", err
}
// Print the updated client to server and server to client maps.
return true, config.ConfigureListByName(sargs, cfgname, "cfgName"), nil
}
if cfgname == "showPprofLabels" {
err := configureSetShowPprofLabels(sargs, rest)
if err != nil {
return false, "", err
}
// Print the updated labels
return true, config.ConfigureListByName(sargs, cfgname, "cfgName"), nilView on GitHub (pinned to a23773e6c3)
Solutions
- Run 'config -list' to enumerate valid DAP configuration parameter names.
- Check spelling and camelCase (e.g. 'maxStringLen', not 'max-string-len').
- Verify the option exists in your Delve version; some parameters are DAP-only or CLI-only.
- If the setting belongs to launch.json, set it there instead of via the debug console.
Example fix
// before config max-string-len 64 // after config maxStringLen 64
Defensive patterns
Strategy: validation
Validate before calling
// enumerate valid names before setting:
out := runEval("config -list")
validNames := parseConfigNames(out) // names shown by ConfigureList
if !validNames[camelCaseName] {
return fmt.Errorf("%q is not a DAP config parameter; see 'config -list'", camelCaseName)
} Prevention
- Use 'config -list' to discover valid parameter names
- Use DAP camelCase names (maxStringLen), not CLI dash-case
- Check option availability against your Delve version
- Put launch-time options in launch.json rather than debug-console config
When it happens
Trigger: Evaluating 'config <typo>', 'config sourceMaps' (a CLI-only option), 'config max-string-len' (CLI spelling; DAP names differ), or any setting that exists for the terminal client but not in the DAP launch/attach args struct.
Common situations: Reusing dlv CLI config names in the VS Code debug console; typos like 'showGoroutines' vs 'showGoroutineFilters'; settings only present in older/newer Delve versions than the one running; camelCase vs dash-case confusion.
Related errors
- could not find rule for %q
- could not find label %q
- too many arguments to "config substitute-path"
- not enough arguments to "config debug-info-directories"
- wrong argument to "config debug-info-directories"
AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31).
Data as JSON: /api/errors/4536d4bae32cc55e.
Report an issue: GitHub.