go-delve/delve · error
wrong argument %q to watch
Error message
wrong argument %q to watch
What it means
Error "wrong argument %q to watch" thrown in go-delve/delve.
Source
Thrown at pkg/terminal/command.go:2088
return runEditor(fmt.Sprintf("+%d", lineno), file)
}
}
func watchpoint(t *Term, ctx callContext, args string) error {
v := strings.SplitN(args, " ", 2)
if len(v) != 2 {
return errors.New("wrong number of arguments: watch [-r|-w|-rw] <expr>")
}
var wtype api.WatchType
switch v[0] {
case "-r":
wtype = api.WatchRead
case "-w":
wtype = api.WatchWrite
case "-rw":
wtype = api.WatchRead | api.WatchWrite
default:
return fmt.Errorf("wrong argument %q to watch", v[0])
}
bp, err := t.client.CreateWatchpoint(ctx.Scope, v[1], wtype)
if err != nil {
return err
}
fmt.Fprintf(t.stdout, "%s set at %s\n", formatBreakpointName(bp, true), t.formatBreakpointLocation(bp))
return nil
}
func examineMemoryCmd(t *Term, ctx callContext, argstr string) error {
args, err := api.ParseExamineMemoryArg(argstr)
if err != nil {
return err
}
var address uint64
if args.IsExpr {View on GitHub (pinned to a23773e6c3)
When it happens
Trigger: Thrown at pkg/terminal/command.go:2088 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/7ae2edddbfd347e4.
Report an issue: GitHub.