{"record":{"id":"65f79842e54d3149","repo":"micro/go-micro","slug":"unsupported-profile-s","errorCode":null,"errorMessage":"unsupported profile: %s","messagePattern":"unsupported profile: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/cmd.go","lineNumber":503,"sourceCode":"\t}\n\n\t// Set the registry\n\tif name := ctx.String(\"registry\"); len(name) > 0 && (*c.opts.Registry).String() != name {\n\t\tr, ok := c.opts.Registries[name]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"registry %q is not linked into this binary: import go-micro.dev/v6/cmd/defaults to enable flag-selected plugins\", name)\n\t\t}\n\n\t\tsopts, clopts := c.setRegistry(r())\n\t\tserverOpts = append(serverOpts, sopts...)\n\t\tclientOpts = append(clientOpts, clopts...)\n\t}\n\n\t// Set the debug profile\n\tif name := ctx.String(\"debug-profile\"); len(name) > 0 {\n\t\tp, ok := c.opts.DebugProfiles[name]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"unsupported profile: %s\", name)\n\t\t}\n\t\t*c.opts.DebugProfile = p()\n\t}\n\n\t// Set the broker\n\tif name := ctx.String(\"broker\"); len(name) > 0 && (*c.opts.Broker).String() != name {\n\t\tb, ok := c.opts.Brokers[name]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"broker %q is not linked into this binary: import go-micro.dev/v6/cmd/defaults to enable flag-selected plugins\", name)\n\t\t}\n\t\tsopts, clopts := c.setBroker(b())\n\t\tserverOpts = append(serverOpts, sopts...)\n\t\tclientOpts = append(clientOpts, clopts...)\n\t}\n\n\t// Set the selector\n\tif name := ctx.String(\"selector\"); len(name) > 0 && (*c.opts.Selector).String() != name {\n\t\ts, ok := c.opts.Selectors[name]","sourceCodeStart":485,"sourceCodeEnd":521,"githubUrl":"https://github.com/micro/go-micro/blob/24529f140421a11a33b6999ab7944f2021cfd69c/cmd/cmd.go#L485-L521","documentation":"The --debug-profile flag selects an entry from c.opts.DebugProfiles; unknown names produce this error. Debug profiles are registered by plugin packages, so only linked ones are valid.","triggerScenarios":"Passing --debug-profile net (or any name) that no imported package registered into c.opts.DebugProfiles, or misspelling the profile name.","commonSituations":"Copying example CLI invocations from docs without importing the matching debug profile package; typos; debugging scripts that reference profiles removed in a newer go-micro version.","solutions":["Correct the profile name spelling against available DebugProfiles registrations.","Import the package that registers the debug profile (or go-micro.dev/v6/cmd/defaults) and rebuild.","Omit --debug-profile if debugging output is not needed.","Check the go-micro version's profile list if following older documentation."],"exampleFix":"// before\nmicro --debug-profile net server\n// after: link it\nimport _ \"go-micro.dev/v6/cmd/defaults\" // registers debug profiles\n// or omit the flag:\nmicro server","handlingStrategy":"validation","validationCode":"allowedDebugProfiles := map[string]bool{\"\": true, \"net\": true /* linked */}\nif !allowedDebugProfiles[*debugProfileFlag] {\n    return fmt.Errorf(\"debug profile %q not registered in this binary\", *debugProfileFlag)\n}","typeGuard":null,"tryCatchPattern":"if err := c.Run(ctx); err != nil {\n    if strings.HasPrefix(err.Error(), \"unsupported profile:\") {\n        return fmt.Errorf(\"%w (import the package registering this debug profile)\", err)\n    }\n    return err\n}","preventionTips":["Only use --debug-profile names that exist in your build's DebugProfiles map.","Remove stale debug profile flags from scripts after go-micro upgrades.","Keep debug profiles in dev builds only, validated by a startup check."],"tags":["cli","debug-profile","plugin-registration"],"backgroundTag":"plugin-not-linked","analyzedSha":"24529f140421a11a33b6999ab7944f2021cfd69c","analyzedAt":"2026-09-01T02:52:24.923Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}