go-delve/delve · error

unknown config parameter

Error message

unknown config parameter

What it means

The 'help config <param>' path validates the requested configuration parameter with configureValidParameter; if the parameter name is not a known Delve config key, this error is returned. It means you asked for documentation of a config setting that does not exist.

Source

Thrown at pkg/terminal/command.go:768

		}
	}
}

var errNoCmd = errors.New("command not available")

func noCmdAvailable(t *Term, ctx callContext, args string) error {
	return errNoCmd
}

func nullCommand(t *Term, ctx callContext, args string) error {
	return nil
}

func (c *Commands) help(t *Term, ctx callContext, args string) error {
	if args != "" {
		if p1, p2, ok := strings.Cut(args, " "); ok && p1 == "config" {
			if !configureValidParameter(t, p2) {
				return errors.New("unknown config parameter")
			}
			if doc := config.Documentation[p2]; doc != "" {
				fmt.Fprintln(t.stdout, doc)
				return nil
			}
			return errors.New("not documented")
		}

		for _, cmd := range c.cmds {
			if slices.Contains(cmd.aliases, args) {
				fmt.Fprintln(t.stdout, cmd.helpMsg)
				return nil
			}
		}
		return errNoCmd
	}

	fmt.Fprintln(t.stdout, "The following commands are available:")

View on GitHub (pinned to a23773e6c3)

Solutions

  1. Run 'help config' (no argument) or 'config' to see valid parameters
  2. Check spelling of the parameter (e.g. max-array-values, substitute-path)
  3. Consult Documentation/cli/locspec or 'config -list' style output for current keys

Example fix

// before
(dlv) help config maxarray
// after
(dlv) help config max-array-values
Defensive patterns

Strategy: validation

Validate before calling

// Validate the config parameter before asking for help
known := []string{"max-array-values","max-string-len","follow-exec","substitute-path","show-hidden-variables"}
if !slices.Contains(known, param) {
    return fmt.Errorf("unknown config parameter %q", param)
}

Try / catch

err := cmds.Help(term, ctx, "config "+param)
if err != nil && strings.Contains(err.Error(), "unknown config parameter") {
    fmt.Fprintf(os.Stderr, "%q is not a config key; run 'help config'\n", param)
}

Prevention

When it happens

Trigger: Running 'help config <name>' where <name> is not a valid configure parameter (e.g. 'help config maxarravalues' misspelled).

Common situations: Misspelled config parameter names; copying config keys from old documentation or other debugger docs.

Related errors


AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31). Data as JSON: /api/errors/06d708cb16237d88. Report an issue: GitHub.