go-delve/delve · error
depth must be a number
Error message
depth must be a number
What it means
Error "depth must be a number" thrown in go-delve/delve.
Source
Thrown at pkg/terminal/command.go:2513
}
case "-a":
i++
n, err := numarg("-a")
if err != nil {
return stackArgs{}, err
}
r.ancestors = n
case "-adepth":
i++
n, err := numarg("-adepth")
if err != nil {
return stackArgs{}, err
}
r.ancestorDepth = n
default:
n, err := strconv.Atoi(args[i])
if err != nil {
return stackArgs{}, errors.New("depth must be a number")
}
r.depth = n
}
}
}
if r.ancestors > 0 && r.ancestorDepth == 0 {
r.ancestorDepth = r.depth
}
return r, nil
}
// getLocation returns the current location or the locations specified by the argument.
// getLocation is used to process the argument of list and edit commands.
func getLocation(t *Term, ctx callContext, args string, showContext bool) (file string, lineno int, showarrow bool, err error) {
switch {
case len(args) == 0 && !ctx.scoped():
state, err := t.client.GetState()
if err != nil {View on GitHub (pinned to a23773e6c3)
When it happens
Trigger: Thrown at pkg/terminal/command.go:2513 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31).
Data as JSON: /api/errors/8188e1334f9ccbfb.
Report an issue: GitHub.