{"record":{"id":"29a4c93c1e1663ee","repo":"go-delve/delve","slug":"not-enough-arguments-29a4c9","errorCode":null,"errorMessage":"not enough arguments","messagePattern":"not enough arguments","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/terminal/command.go","lineNumber":1019,"sourceCode":"\t\tfmt.Fprintf(t.stdout, \"Switched from %d to %d (thread %d)\\n\", selectedGID(oldState), gid, newState.CurrentThread.ID)\n\t\treturn nil\n\t}\n\n\tvar err error\n\tctx.Scope.GoroutineID, err = strconv.ParseInt(args[0], 10, 64)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn c.CallWithContext(args[1], t, ctx)\n}\n\n// Handle \"frame\", \"up\", \"down\" commands.\nfunc (c *Commands) frameCommand(t *Term, ctx callContext, argstr string, direction frameDirection) error {\n\tframe := 1\n\targ := \"\"\n\tif len(argstr) == 0 {\n\t\tif direction == frameSet {\n\t\t\treturn errors.New(\"not enough arguments\")\n\t\t}\n\t} else {\n\t\targs := config.Split2PartsBySpace(argstr)\n\t\tvar err error\n\t\tif frame, err = strconv.Atoi(args[0]); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif len(args) > 1 {\n\t\t\targ = args[1]\n\t\t}\n\t}\n\tswitch direction {\n\tcase frameUp:\n\t\tframe = c.frame + frame\n\tcase frameDown:\n\t\tframe = c.frame - frame\n\t}\n\tif len(arg) > 0 {","sourceCodeStart":1001,"sourceCodeEnd":1037,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/terminal/command.go#L1001-L1037","documentation":"For 'frame <n>' the frame number is required; this error is returned when frameCommand is invoked with an empty argument in frameSet direction (i.e. the plain 'frame' command). 'up'/'down' default to 1 frame, but 'frame' must be told which frame to select.","triggerScenarios":"Typing 'frame' with no argument; non-numeric arguments instead raise a strconv error.","commonSituations":"Expecting 'frame' to default to frame 0 or to show the current frame like in GDB.","solutions":["Provide a frame number: 'frame 0' for the topmost frame","Use 'up'/'down' to move relatively, or 'frame up'/'frame down'","Run 'stack' first to see valid frame indices"],"exampleFix":"// before\n(dlv) frame\n// after\n(dlv) frame 0","handlingStrategy":"validation","validationCode":"// Require a frame number for 'frame'\nif cmd == \"frame\" && len(strings.Fields(argstr)) == 0 {\n    return errors.New(\"usage: frame <n>; use 'up'/'down' for relative moves\")\n}\nif n, err := strconv.Atoi(argstr); err != nil || n < 0 {\n    return fmt.Errorf(\"frame must be a non-negative integer\")\n}","typeGuard":null,"tryCatchPattern":"err := term.ExecuteCommand(\"frame\")\nif err != nil && strings.Contains(err.Error(), \"not enough arguments\") {\n    // default to frame 0 or show stack\nst, _ := client.Stacktrace(goroutineID, 20, 0, nil)\n    printStack(st)\n}","preventionTips":["Always pass a frame index to 'frame' (0 is the topmost)","Use 'up'/'down' for relative frame movement","Run 'stack' first to see valid frame numbers"],"tags":["terminal","stack-frame","cli"],"backgroundTag":"missing-required-argument","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}