{"record":{"id":"4536d4bae32cc55e","repo":"go-delve/delve","slug":"q-is-not-a-configuration-parameter-4536d4","errorCode":null,"errorMessage":"%q is not a configuration parameter","messagePattern":"%q is not a configuration parameter","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"service/dap/config.go","lineNumber":29,"sourceCode":"\nfunc listConfig(args *launchAttachArgs) string {\n\tvar buf bytes.Buffer\n\tconfig.ConfigureList(&buf, args, \"cfgName\")\n\treturn buf.String()\n}\n\nfunc configureSet(sargs *launchAttachArgs, args string) (bool, string, error) {\n\tv := config.Split2PartsBySpace(args)\n\n\tcfgname := v[0]\n\tvar rest string\n\tif len(v) == 2 {\n\t\trest = v[1]\n\t}\n\n\tfield := config.ConfigureFindFieldByName(sargs, cfgname, \"cfgName\")\n\tif !field.CanAddr() {\n\t\treturn false, \"\", fmt.Errorf(\"%q is not a configuration parameter\", cfgname)\n\t}\n\n\tif cfgname == \"substitutePath\" {\n\t\terr := configureSetSubstitutePath(sargs, rest)\n\t\tif err != nil {\n\t\t\treturn false, \"\", err\n\t\t}\n\t\t// Print the updated client to server and server to client maps.\n\t\treturn true, config.ConfigureListByName(sargs, cfgname, \"cfgName\"), nil\n\t}\n\n\tif cfgname == \"showPprofLabels\" {\n\t\terr := configureSetShowPprofLabels(sargs, rest)\n\t\tif err != nil {\n\t\t\treturn false, \"\", err\n\t\t}\n\t\t// Print the updated labels\n\t\treturn true, config.ConfigureListByName(sargs, cfgname, \"cfgName\"), nil","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/service/dap/config.go#L11-L47","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nconfig max-string-len 64\n// after\nconfig maxStringLen 64","handlingStrategy":"validation","validationCode":"// enumerate valid names before setting:\nout := runEval(\"config -list\")\nvalidNames := parseConfigNames(out) // names shown by ConfigureList\nif !validNames[camelCaseName] {\n    return fmt.Errorf(\"%q is not a DAP config parameter; see 'config -list'\", camelCaseName)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["dap","configuration","reflection"],"backgroundTag":"unknown-config-parameter","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}