{"record":{"id":"7ae2edddbfd347e4","repo":"go-delve/delve","slug":"wrong-argument-q-to-watch","errorCode":null,"errorMessage":"wrong argument %q to watch","messagePattern":"wrong argument %q to watch","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/terminal/command.go","lineNumber":2088,"sourceCode":"\t\treturn runEditor(fmt.Sprintf(\"+%d\", lineno), file)\n\t}\n}\n\nfunc watchpoint(t *Term, ctx callContext, args string) error {\n\tv := strings.SplitN(args, \" \", 2)\n\tif len(v) != 2 {\n\t\treturn errors.New(\"wrong number of arguments: watch [-r|-w|-rw] <expr>\")\n\t}\n\tvar wtype api.WatchType\n\tswitch v[0] {\n\tcase \"-r\":\n\t\twtype = api.WatchRead\n\tcase \"-w\":\n\t\twtype = api.WatchWrite\n\tcase \"-rw\":\n\t\twtype = api.WatchRead | api.WatchWrite\n\tdefault:\n\t\treturn fmt.Errorf(\"wrong argument %q to watch\", v[0])\n\t}\n\tbp, err := t.client.CreateWatchpoint(ctx.Scope, v[1], wtype)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfmt.Fprintf(t.stdout, \"%s set at %s\\n\", formatBreakpointName(bp, true), t.formatBreakpointLocation(bp))\n\treturn nil\n}\n\nfunc examineMemoryCmd(t *Term, ctx callContext, argstr string) error {\n\targs, err := api.ParseExamineMemoryArg(argstr)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar address uint64\n\n\tif args.IsExpr {","sourceCodeStart":2070,"sourceCodeEnd":2106,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/terminal/command.go#L2070-L2106","documentation":"Error \"wrong argument %q to watch\" thrown in go-delve/delve.","triggerScenarios":"Thrown at pkg/terminal/command.go:2088 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"}