{"record":{"id":"2db07a9dcd6a7a31","repo":"istio/istio","slug":"debug-type-is-required-you-can-specify-list-fla","errorCode":null,"errorMessage":"debug type is required, you can specify --list flag to list supported debug types","messagePattern":"debug type is required, you can specify --list flag to list supported debug types","errorType":"validation","errorClass":"util.CommandParseError","httpStatus":null,"severity":"warning","filePath":"istioctl/pkg/internaldebug/internal-debug.go","lineNumber":139,"sourceCode":"\t\tRunE: func(c *cobra.Command, args []string) error {\n\t\t\tkubeClient, err := ctx.CLIClientWithRevision(ctx.RevisionOrDefault(opts.Revision))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tsw := DebugWriter{\n\t\t\t\tWriter:                 c.OutOrStdout(),\n\t\t\t\tInternalDebugAllIstiod: internalDebugAllIstiod,\n\t\t\t}\n\t\t\tif len(args) == 0 {\n\t\t\t\tif list {\n\t\t\t\t\txdsResponses, err := HandlerForRetrieveDebugList(list, kubeClient, centralOpts, c.OutOrStdout(), ctx.IstioNamespace())\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\treturn sw.PrintAll(xdsResponses)\n\t\t\t\t}\n\t\t\t\treturn util.CommandParseError{\n\t\t\t\t\tErr: fmt.Errorf(\"debug type is required, you can specify --list flag to list supported debug types\"),\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar xdsRequest discovery.DiscoveryRequest\n\t\t\tvar namespace, serviceAccount string\n\n\t\t\txdsRequest = discovery.DiscoveryRequest{\n\t\t\t\tResourceNames: []string{args[0]},\n\t\t\t\tNode: &core.Node{\n\t\t\t\t\tId: \"debug~0.0.0.0~istioctl~cluster.local\",\n\t\t\t\t},\n\t\t\t\tTypeUrl: v3.DebugType,\n\t\t\t}\n\n\t\t\txdsResponses, err := multixds.MultiRequestAndProcessXds(internalDebugAllIstiod, &xdsRequest, centralOpts, ctx.IstioNamespace(),\n\t\t\t\tnamespace, serviceAccount, kubeClient, multixds.DefaultOptions)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/istio/istio/blob/8dc789c5cf17517c64e3c36cb3288230f149dfae/istioctl/pkg/internaldebug/internal-debug.go#L121-L157","documentation":"The internal-debug command requires either a debug type argument or the --list flag; with neither, it returns a util.CommandParseError so cobra prints usage alongside this message. It is a pure usage/validation error before any cluster call.","triggerScenarios":"Running `istioctl x internal-debug` (or the proxy-config debug variant) with zero arguments and no --list.","commonSituations":"Users unfamiliar with the debug surface running the bare command to discover options.","solutions":["Add --list to enumerate supported debug types: istioctl x internal-debug --list","Provide a debug type: istioctl x internal-debug <type>"],"exampleFix":"# before\nistioctl x internal-debug\n# after\nistioctl x internal-debug --list","handlingStrategy":"validation","validationCode":"// Require a debug type or --list before executing\nif len(args) == 0 && !list {\n\treturn fmt.Errorf(\"debug type is required, you can specify --list flag to list supported debug types\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run `istioctl x internal-debug --list` first to enumerate valid debug types","Validate CLI arguments in wrappers before invoking istioctl"],"tags":["istioctl","cli","usage","internal-debug"],"backgroundTag":null,"analyzedSha":"8dc789c5cf17517c64e3c36cb3288230f149dfae","analyzedAt":"2026-08-15T15:16:55.434Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}