go-delve/delve · error
you must provide an address as the first argument
Error message
you must provide an address as the first argument
What it means
Error "you must provide an address as the first argument" thrown in go-delve/delve.
Source
Thrown at cmd/dlv/cmds/commands.go:211
},
}
attachCommand.Flags().BoolVar(&continueOnStart, "continue", false, "Continue the debugged process on start.")
attachCommand.Flags().StringVar(&attachWaitFor, "waitfor", "", "Wait for a process with a name beginning with this prefix")
must(attachCommand.RegisterFlagCompletionFunc("waitfor", cobra.NoFileCompletions))
attachCommand.Flags().Float64Var(&attachWaitForInterval, "waitfor-interval", 1, "Interval between checks of the process list, in millisecond")
must(attachCommand.RegisterFlagCompletionFunc("waitfor-interval", cobra.NoFileCompletions))
attachCommand.Flags().Float64Var(&attachWaitForDuration, "waitfor-duration", 0, "Total time to wait for a process")
must(attachCommand.RegisterFlagCompletionFunc("waitfor-duration", cobra.NoFileCompletions))
rootCommand.AddCommand(attachCommand)
// 'connect' subcommand.
connectCommand := &cobra.Command{
Use: "connect addr",
Short: "Connect to a headless debug server with a terminal client.",
Long: "Connect to a running headless debug server with a terminal client. Prefix with 'unix:' to use a unix domain socket.",
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
return errors.New("you must provide an address as the first argument")
}
return nil
},
Run: connectCmd,
ValidArgsFunction: cobra.NoFileCompletions,
}
rootCommand.AddCommand(connectCommand)
// 'dap' subcommand.
dapCommand := &cobra.Command{
Use: "dap",
Short: "Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).",
Long: `Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
The server is always headless and requires a DAP client like VS Code to connect and request a binary
to be launched or a process to be attached to. The following modes can be specified via the client's launch config:
- launch + exec (executes precompiled binary, like 'dlv exec')
- launch + debug (builds and launches, like 'dlv debug')View on GitHub (pinned to a23773e6c3)
When it happens
Trigger: Thrown at cmd/dlv/cmds/commands.go:211 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/cbca724a857ec519.
Report an issue: GitHub.