{"record":{"id":"cbca724a857ec519","repo":"go-delve/delve","slug":"you-must-provide-an-address-as-the-first-argument","errorCode":null,"errorMessage":"you must provide an address as the first argument","messagePattern":"you must provide an address as the first argument","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/dlv/cmds/commands.go","lineNumber":211,"sourceCode":"\t\t},\n\t}\n\tattachCommand.Flags().BoolVar(&continueOnStart, \"continue\", false, \"Continue the debugged process on start.\")\n\tattachCommand.Flags().StringVar(&attachWaitFor, \"waitfor\", \"\", \"Wait for a process with a name beginning with this prefix\")\n\tmust(attachCommand.RegisterFlagCompletionFunc(\"waitfor\", cobra.NoFileCompletions))\n\tattachCommand.Flags().Float64Var(&attachWaitForInterval, \"waitfor-interval\", 1, \"Interval between checks of the process list, in millisecond\")\n\tmust(attachCommand.RegisterFlagCompletionFunc(\"waitfor-interval\", cobra.NoFileCompletions))\n\tattachCommand.Flags().Float64Var(&attachWaitForDuration, \"waitfor-duration\", 0, \"Total time to wait for a process\")\n\tmust(attachCommand.RegisterFlagCompletionFunc(\"waitfor-duration\", cobra.NoFileCompletions))\n\trootCommand.AddCommand(attachCommand)\n\n\t// 'connect' subcommand.\n\tconnectCommand := &cobra.Command{\n\t\tUse:   \"connect addr\",\n\t\tShort: \"Connect to a headless debug server with a terminal client.\",\n\t\tLong:  \"Connect to a running headless debug server with a terminal client. Prefix with 'unix:' to use a unix domain socket.\",\n\t\tPersistentPreRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif len(args) == 0 {\n\t\t\t\treturn errors.New(\"you must provide an address as the first argument\")\n\t\t\t}\n\t\t\treturn nil\n\t\t},\n\t\tRun:               connectCmd,\n\t\tValidArgsFunction: cobra.NoFileCompletions,\n\t}\n\trootCommand.AddCommand(connectCommand)\n\n\t// 'dap' subcommand.\n\tdapCommand := &cobra.Command{\n\t\tUse:   \"dap\",\n\t\tShort: \"Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).\",\n\t\tLong: `Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).\n\nThe server is always headless and requires a DAP client like VS Code to connect and request a binary\nto be launched or a process to be attached to. The following modes can be specified via the client's launch config:\n- launch + exec   (executes precompiled binary, like 'dlv exec')\n- launch + debug  (builds and launches, like 'dlv debug')","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/cmd/dlv/cmds/commands.go#L193-L229","documentation":"Error \"you must provide an address as the first argument\" thrown in go-delve/delve.","triggerScenarios":"Thrown at cmd/dlv/cmds/commands.go:211 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"}