istio/istio · warning · util.CommandParseError
debug type is required, you can specify --list flag to list
Error message
debug type is required, you can specify --list flag to list supported debug types
What it means
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.
Source
Thrown at istioctl/pkg/internaldebug/internal-debug.go:139
RunE: func(c *cobra.Command, args []string) error {
kubeClient, err := ctx.CLIClientWithRevision(ctx.RevisionOrDefault(opts.Revision))
if err != nil {
return err
}
sw := DebugWriter{
Writer: c.OutOrStdout(),
InternalDebugAllIstiod: internalDebugAllIstiod,
}
if len(args) == 0 {
if list {
xdsResponses, err := HandlerForRetrieveDebugList(list, kubeClient, centralOpts, c.OutOrStdout(), ctx.IstioNamespace())
if err != nil {
return err
}
return sw.PrintAll(xdsResponses)
}
return util.CommandParseError{
Err: fmt.Errorf("debug type is required, you can specify --list flag to list supported debug types"),
}
}
var xdsRequest discovery.DiscoveryRequest
var namespace, serviceAccount string
xdsRequest = discovery.DiscoveryRequest{
ResourceNames: []string{args[0]},
Node: &core.Node{
Id: "debug~0.0.0.0~istioctl~cluster.local",
},
TypeUrl: v3.DebugType,
}
xdsResponses, err := multixds.MultiRequestAndProcessXds(internalDebugAllIstiod, &xdsRequest, centralOpts, ctx.IstioNamespace(),
namespace, serviceAccount, kubeClient, multixds.DefaultOptions)
if err != nil {
return err
}View on GitHub (pinned to 8dc789c5cf)
Solutions
- Add --list to enumerate supported debug types: istioctl x internal-debug --list
- Provide a debug type: istioctl x internal-debug <type>
Example fix
# before istioctl x internal-debug # after istioctl x internal-debug --list
Defensive patterns
Strategy: validation
Validate before calling
// Require a debug type or --list before executing
if len(args) == 0 && !list {
return fmt.Errorf("debug type is required, you can specify --list flag to list supported debug types")
} Prevention
- Run `istioctl x internal-debug --list` first to enumerate valid debug types
- Validate CLI arguments in wrappers before invoking istioctl
When it happens
Trigger: Running `istioctl x internal-debug` (or the proxy-config debug variant) with zero arguments and no --list.
Common situations: Users unfamiliar with the debug surface running the bare command to discover options.
Related errors
- unknown subcommand %q
- output format %q not supported
- pattern %s did not match
- unknown subcommand %q
- stdin is only allowed as the last filename
AI-assisted analysis of istio/istio@8dc789c5cf (2026-08-15).
Data as JSON: /api/errors/2db07a9dcd6a7a31.
Report an issue: GitHub.