{"record":{"id":"77f3a0c2c83c520a","repo":"go-delve/delve","slug":"too-many-arguments-to-config-showpproflabels","errorCode":null,"errorMessage":"too many arguments to \"config showPprofLabels\"","messagePattern":"too many arguments to \"config showPprofLabels\"","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"service/dap/config.go","lineNumber":128,"sourceCode":"\tswitch len(argv) {\n\tcase 0:\n\t\t// do nothing, let caller show the current list of labels\n\t\treturn nil\n\tcase 1:\n\t\tif delete {\n\t\t\tfor i := range args.ShowPprofLabels {\n\t\t\t\tif args.ShowPprofLabels[i] == argv[0] {\n\t\t\t\t\tcopy(args.ShowPprofLabels[i:], args.ShowPprofLabels[i+1:])\n\t\t\t\t\targs.ShowPprofLabels = args.ShowPprofLabels[:len(args.ShowPprofLabels)-1]\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"could not find label %q\", argv[0])\n\t\t} else {\n\t\t\targs.ShowPprofLabels = append(args.ShowPprofLabels, argv[0])\n\t\t}\n\tdefault:\n\t\treturn errors.New(\"too many arguments to \\\"config showPprofLabels\\\"\")\n\t}\n\treturn nil\n}\n","sourceCodeStart":110,"sourceCodeEnd":132,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/service/dap/config.go#L110-L132","documentation":"The DAP `config showPprofLabels` setting accepts either `-clear`, `-list`, a single label to remove (if present), or one label to add. configureSetShowPprofLabels returns this error when more than the allowed number of label arguments is supplied.","triggerScenarios":"`config showPprofLabels=<a> <b>` — two or more labels in one command; pasting a space-separated list of labels intending to add them all at once.","commonSituations":"Users familiar with comma/space list settings trying to set multiple labels in one go; automation scripts joining a label slice with spaces; labels containing spaces splitting into multiple tokens.","solutions":["Add labels one per command invocation","Check the label list with `config showPprofLabels -list` before editing","Use `config showPprofLabels -clear` to reset, then add labels individually"],"exampleFix":"// before\nconfig showPprofLabels=cpu heap\n// after\nconfig showPprofLabels=cpu\nconfig showPprofLabels=heap","handlingStrategy":"validation","validationCode":"if len(labels) > 1 {\n\tfor _, l := range labels { send(\"config showPprofLabels=\" + l) }\n\treturn\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Send labels one at a time","Use -clear then re-add individually","Reject/quote labels containing spaces"],"tags":["dap","config","pprof"],"backgroundTag":"too-many-arguments","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}