{"record":{"id":"8188e1334f9ccbfb","repo":"go-delve/delve","slug":"depth-must-be-a-number","errorCode":null,"errorMessage":"depth must be a number","messagePattern":"depth must be a number","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/terminal/command.go","lineNumber":2513,"sourceCode":"\t\t\t\t}\n\t\t\tcase \"-a\":\n\t\t\t\ti++\n\t\t\t\tn, err := numarg(\"-a\")\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn stackArgs{}, err\n\t\t\t\t}\n\t\t\t\tr.ancestors = n\n\t\t\tcase \"-adepth\":\n\t\t\t\ti++\n\t\t\t\tn, err := numarg(\"-adepth\")\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn stackArgs{}, err\n\t\t\t\t}\n\t\t\t\tr.ancestorDepth = n\n\t\t\tdefault:\n\t\t\t\tn, err := strconv.Atoi(args[i])\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn stackArgs{}, errors.New(\"depth must be a number\")\n\t\t\t\t}\n\t\t\t\tr.depth = n\n\t\t\t}\n\t\t}\n\t}\n\tif r.ancestors > 0 && r.ancestorDepth == 0 {\n\t\tr.ancestorDepth = r.depth\n\t}\n\treturn r, nil\n}\n\n// getLocation returns the current location or the locations specified by the argument.\n// getLocation is used to process the argument of list and edit commands.\nfunc getLocation(t *Term, ctx callContext, args string, showContext bool) (file string, lineno int, showarrow bool, err error) {\n\tswitch {\n\tcase len(args) == 0 && !ctx.scoped():\n\t\tstate, err := t.client.GetState()\n\t\tif err != nil {","sourceCodeStart":2495,"sourceCodeEnd":2531,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/terminal/command.go#L2495-L2531","documentation":"Error \"depth must be a number\" thrown in go-delve/delve.","triggerScenarios":"Thrown at pkg/terminal/command.go:2513 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}