
Due to some very old mistakes too many of Delve's flags are declared as persistent on cobra's root command. For example the headless flag is a global flag but does not apply to connect, dap or trace; the backend flag does not apply to replay, core and dap; etc. Almost all global flags should have been declared as local flags on individual subcommands. Unfortunately we can not change this without breaking backwards compatibility, for example: dlv --headless debug would not parse if headless was a flag of debug instead of a global flag. Instead we alter usage function and the markdown generation script to strategically hide the flags that don't apply. Fixes #2361
33 lines
831 B
Markdown
33 lines
831 B
Markdown
## dlv connect
|
|
|
|
Connect to a headless debug server with a terminal client.
|
|
|
|
### Synopsis
|
|
|
|
Connect to a running headless debug server with a terminal client.
|
|
|
|
```
|
|
dlv connect addr [flags]
|
|
```
|
|
|
|
### Options
|
|
|
|
```
|
|
-h, --help help for connect
|
|
```
|
|
|
|
### Options inherited from parent commands
|
|
|
|
```
|
|
--backend string Backend selection (see 'dlv help backend'). (default "default")
|
|
--init string Init file, executed by the terminal client.
|
|
--log Enable debugging server logging.
|
|
--log-dest string Writes logs to the specified file or file descriptor (see 'dlv help log').
|
|
--log-output string Comma separated list of components that should produce debug output (see 'dlv help log')
|
|
```
|
|
|
|
### SEE ALSO
|
|
|
|
* [dlv](dlv.md) - Delve is a debugger for the Go programming language.
|
|
|