commmands: update DAP overview in help (#2850)
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
This commit is contained in:
parent
f09896a593
commit
4c1f8b4b25
@ -18,14 +18,14 @@ Pass flags to the program you are debugging using `--`, for example:
|
||||
### Options
|
||||
|
||||
```
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections.
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
|
||||
--allow-non-terminal-interactive Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
|
||||
--api-version int Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--api-version int Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--backend string Backend selection (see 'dlv help backend'). (default "default")
|
||||
--build-flags string Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
|
||||
--check-go-version Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
|
||||
--disable-aslr Disables address space randomization
|
||||
--headless Run debug server only, in headless mode.
|
||||
--headless Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
|
||||
-h, --help help for dlv
|
||||
--init string Init file, executed by the terminal client.
|
||||
-l, --listen string Debugging server listen address. (default "127.0.0.1:0")
|
||||
@ -40,9 +40,9 @@ Pass flags to the program you are debugging using `--`, for example:
|
||||
### SEE ALSO
|
||||
|
||||
* [dlv attach](dlv_attach.md) - Attach to running process and begin debugging.
|
||||
* [dlv connect](dlv_connect.md) - Connect to a headless debug server.
|
||||
* [dlv connect](dlv_connect.md) - Connect to a headless debug server with a terminal client.
|
||||
* [dlv core](dlv_core.md) - Examine a core dump.
|
||||
* [dlv dap](dlv_dap.md) - [EXPERIMENTAL] Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
|
||||
* [dlv dap](dlv_dap.md) - Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
|
||||
* [dlv debug](dlv_debug.md) - Compile and begin debugging main package in current directory, or the package specified.
|
||||
* [dlv exec](dlv_exec.md) - Execute a precompiled binary, and begin a debug session.
|
||||
* [dlv replay](dlv_replay.md) - Replays a rr trace.
|
||||
|
@ -25,14 +25,14 @@ dlv attach pid [executable] [flags]
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections.
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
|
||||
--allow-non-terminal-interactive Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
|
||||
--api-version int Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--api-version int Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--backend string Backend selection (see 'dlv help backend'). (default "default")
|
||||
--build-flags string Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
|
||||
--check-go-version Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
|
||||
--disable-aslr Disables address space randomization
|
||||
--headless Run debug server only, in headless mode.
|
||||
--headless Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
|
||||
--init string Init file, executed by the terminal client.
|
||||
-l, --listen string Debugging server listen address. (default "127.0.0.1:0")
|
||||
--log Enable debugging server logging.
|
||||
|
@ -23,14 +23,14 @@ are:
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections.
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
|
||||
--allow-non-terminal-interactive Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
|
||||
--api-version int Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--api-version int Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--backend string Backend selection (see 'dlv help backend'). (default "default")
|
||||
--build-flags string Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
|
||||
--check-go-version Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
|
||||
--disable-aslr Disables address space randomization
|
||||
--headless Run debug server only, in headless mode.
|
||||
--headless Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
|
||||
--init string Init file, executed by the terminal client.
|
||||
-l, --listen string Debugging server listen address. (default "127.0.0.1:0")
|
||||
--log Enable debugging server logging.
|
||||
|
@ -1,10 +1,10 @@
|
||||
## dlv connect
|
||||
|
||||
Connect to a headless debug server.
|
||||
Connect to a headless debug server with a terminal client.
|
||||
|
||||
### Synopsis
|
||||
|
||||
Connect to a running headless debug server.
|
||||
Connect to a running headless debug server with a terminal client.
|
||||
|
||||
```
|
||||
dlv connect addr [flags]
|
||||
@ -19,14 +19,14 @@ dlv connect addr [flags]
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections.
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
|
||||
--allow-non-terminal-interactive Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
|
||||
--api-version int Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--api-version int Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--backend string Backend selection (see 'dlv help backend'). (default "default")
|
||||
--build-flags string Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
|
||||
--check-go-version Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
|
||||
--disable-aslr Disables address space randomization
|
||||
--headless Run debug server only, in headless mode.
|
||||
--headless Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
|
||||
--init string Init file, executed by the terminal client.
|
||||
-l, --listen string Debugging server listen address. (default "127.0.0.1:0")
|
||||
--log Enable debugging server logging.
|
||||
|
@ -25,14 +25,14 @@ dlv core <executable> <core> [flags]
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections.
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
|
||||
--allow-non-terminal-interactive Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
|
||||
--api-version int Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--api-version int Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--backend string Backend selection (see 'dlv help backend'). (default "default")
|
||||
--build-flags string Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
|
||||
--check-go-version Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
|
||||
--disable-aslr Disables address space randomization
|
||||
--headless Run debug server only, in headless mode.
|
||||
--headless Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
|
||||
--init string Init file, executed by the terminal client.
|
||||
-l, --listen string Debugging server listen address. (default "127.0.0.1:0")
|
||||
--log Enable debugging server logging.
|
||||
|
@ -1,22 +1,24 @@
|
||||
## dlv dap
|
||||
|
||||
[EXPERIMENTAL] Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
|
||||
Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
|
||||
|
||||
### Synopsis
|
||||
|
||||
[EXPERIMENTAL] Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
|
||||
Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
|
||||
|
||||
The server is always headless and requires a DAP client like vscode to connect and request a binary
|
||||
to be launched or process to be attached to. The following modes can be specified via client's launch config:
|
||||
- launch + exec (executes precompiled binary, like 'dlv exec')
|
||||
- launch + debug (builds and launches, like 'dlv debug')
|
||||
- launch + test (builds and tests, like 'dlv test')
|
||||
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')
|
||||
- launch + test (builds and tests, like 'dlv test')
|
||||
- launch + replay (replays an rr trace, like 'dlv replay')
|
||||
- launch + core (replays a core dump file, like 'dlv core')
|
||||
- attach + local (attaches to a running process, like 'dlv attach')
|
||||
- launch + core (replays a core dump file, like 'dlv core')
|
||||
- attach + local (attaches to a running process, like 'dlv attach')
|
||||
|
||||
Program and output binary paths will be interpreted relative to dlv's working directory.
|
||||
|
||||
The server does not yet accept multiple client connections (--accept-multiclient).
|
||||
This server does not accept multiple client connections (--accept-multiclient).
|
||||
Use 'dlv [command] --headless' instead and a DAP client with attach + remote config.
|
||||
While --continue is not supported, stopOnEntry launch/attach attribute can be used to control if
|
||||
execution is resumed at the start of the debug session.
|
||||
|
||||
@ -38,14 +40,14 @@ dlv dap [flags]
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections.
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
|
||||
--allow-non-terminal-interactive Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
|
||||
--api-version int Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--api-version int Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--backend string Backend selection (see 'dlv help backend'). (default "default")
|
||||
--build-flags string Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
|
||||
--check-go-version Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
|
||||
--disable-aslr Disables address space randomization
|
||||
--headless Run debug server only, in headless mode.
|
||||
--headless Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
|
||||
--init string Init file, executed by the terminal client.
|
||||
-l, --listen string Debugging server listen address. (default "127.0.0.1:0")
|
||||
--log Enable debugging server logging.
|
||||
|
@ -27,14 +27,14 @@ dlv debug [package] [flags]
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections.
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
|
||||
--allow-non-terminal-interactive Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
|
||||
--api-version int Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--api-version int Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--backend string Backend selection (see 'dlv help backend'). (default "default")
|
||||
--build-flags string Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
|
||||
--check-go-version Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
|
||||
--disable-aslr Disables address space randomization
|
||||
--headless Run debug server only, in headless mode.
|
||||
--headless Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
|
||||
--init string Init file, executed by the terminal client.
|
||||
-l, --listen string Debugging server listen address. (default "127.0.0.1:0")
|
||||
--log Enable debugging server logging.
|
||||
|
@ -27,14 +27,14 @@ dlv exec <path/to/binary> [flags]
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections.
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
|
||||
--allow-non-terminal-interactive Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
|
||||
--api-version int Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--api-version int Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--backend string Backend selection (see 'dlv help backend'). (default "default")
|
||||
--build-flags string Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
|
||||
--check-go-version Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
|
||||
--disable-aslr Disables address space randomization
|
||||
--headless Run debug server only, in headless mode.
|
||||
--headless Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
|
||||
--init string Init file, executed by the terminal client.
|
||||
-l, --listen string Debugging server listen address. (default "127.0.0.1:0")
|
||||
--log Enable debugging server logging.
|
||||
|
@ -38,14 +38,14 @@ and dap modes.
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections.
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
|
||||
--allow-non-terminal-interactive Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
|
||||
--api-version int Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--api-version int Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--backend string Backend selection (see 'dlv help backend'). (default "default")
|
||||
--build-flags string Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
|
||||
--check-go-version Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
|
||||
--disable-aslr Disables address space randomization
|
||||
--headless Run debug server only, in headless mode.
|
||||
--headless Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
|
||||
--init string Init file, executed by the terminal client.
|
||||
-l, --listen string Debugging server listen address. (default "127.0.0.1:0")
|
||||
--log Enable debugging server logging.
|
||||
|
@ -26,14 +26,14 @@ File redirects can also be changed using the 'restart' command.
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections.
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
|
||||
--allow-non-terminal-interactive Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
|
||||
--api-version int Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--api-version int Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--backend string Backend selection (see 'dlv help backend'). (default "default")
|
||||
--build-flags string Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
|
||||
--check-go-version Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
|
||||
--disable-aslr Disables address space randomization
|
||||
--headless Run debug server only, in headless mode.
|
||||
--headless Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
|
||||
--init string Init file, executed by the terminal client.
|
||||
-l, --listen string Debugging server listen address. (default "127.0.0.1:0")
|
||||
--log Enable debugging server logging.
|
||||
|
@ -23,14 +23,14 @@ dlv replay [trace directory] [flags]
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections.
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
|
||||
--allow-non-terminal-interactive Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
|
||||
--api-version int Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--api-version int Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--backend string Backend selection (see 'dlv help backend'). (default "default")
|
||||
--build-flags string Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
|
||||
--check-go-version Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
|
||||
--disable-aslr Disables address space randomization
|
||||
--headless Run debug server only, in headless mode.
|
||||
--headless Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
|
||||
--init string Init file, executed by the terminal client.
|
||||
-l, --listen string Debugging server listen address. (default "127.0.0.1:0")
|
||||
--log Enable debugging server logging.
|
||||
|
@ -15,14 +15,14 @@ dlv run [flags]
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections.
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
|
||||
--allow-non-terminal-interactive Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
|
||||
--api-version int Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--api-version int Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--backend string Backend selection (see 'dlv help backend'). (default "default")
|
||||
--build-flags string Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
|
||||
--check-go-version Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
|
||||
--disable-aslr Disables address space randomization
|
||||
--headless Run debug server only, in headless mode.
|
||||
--headless Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
|
||||
--init string Init file, executed by the terminal client.
|
||||
-l, --listen string Debugging server listen address. (default "127.0.0.1:0")
|
||||
--log Enable debugging server logging.
|
||||
|
@ -29,14 +29,14 @@ dlv test [package] [flags]
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections.
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
|
||||
--allow-non-terminal-interactive Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
|
||||
--api-version int Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--api-version int Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--backend string Backend selection (see 'dlv help backend'). (default "default")
|
||||
--build-flags string Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
|
||||
--check-go-version Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
|
||||
--disable-aslr Disables address space randomization
|
||||
--headless Run debug server only, in headless mode.
|
||||
--headless Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
|
||||
--init string Init file, executed by the terminal client.
|
||||
-l, --listen string Debugging server listen address. (default "127.0.0.1:0")
|
||||
--log Enable debugging server logging.
|
||||
|
@ -33,14 +33,14 @@ dlv trace [package] regexp [flags]
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections.
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
|
||||
--allow-non-terminal-interactive Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
|
||||
--api-version int Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--api-version int Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--backend string Backend selection (see 'dlv help backend'). (default "default")
|
||||
--build-flags string Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
|
||||
--check-go-version Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
|
||||
--disable-aslr Disables address space randomization
|
||||
--headless Run debug server only, in headless mode.
|
||||
--headless Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
|
||||
--init string Init file, executed by the terminal client.
|
||||
-l, --listen string Debugging server listen address. (default "127.0.0.1:0")
|
||||
--log Enable debugging server logging.
|
||||
|
@ -16,14 +16,14 @@ dlv version [flags]
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections.
|
||||
--accept-multiclient Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
|
||||
--allow-non-terminal-interactive Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
|
||||
--api-version int Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--api-version int Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
|
||||
--backend string Backend selection (see 'dlv help backend'). (default "default")
|
||||
--build-flags string Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
|
||||
--check-go-version Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
|
||||
--disable-aslr Disables address space randomization
|
||||
--headless Run debug server only, in headless mode.
|
||||
--headless Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
|
||||
--init string Init file, executed by the terminal client.
|
||||
-l, --listen string Debugging server listen address. (default "127.0.0.1:0")
|
||||
--log Enable debugging server logging.
|
||||
|
@ -133,9 +133,9 @@ func New(docCall bool) *cobra.Command {
|
||||
rootCommand.PersistentFlags().StringVarP(&logOutput, "log-output", "", "", `Comma separated list of components that should produce debug output (see 'dlv help log')`)
|
||||
rootCommand.PersistentFlags().StringVarP(&logDest, "log-dest", "", "", "Writes logs to the specified file or file descriptor (see 'dlv help log').")
|
||||
|
||||
rootCommand.PersistentFlags().BoolVarP(&headless, "headless", "", false, "Run debug server only, in headless mode.")
|
||||
rootCommand.PersistentFlags().BoolVarP(&acceptMulti, "accept-multiclient", "", false, "Allows a headless server to accept multiple client connections.")
|
||||
rootCommand.PersistentFlags().IntVar(&apiVersion, "api-version", 1, "Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md.")
|
||||
rootCommand.PersistentFlags().BoolVarP(&headless, "headless", "", false, "Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.")
|
||||
rootCommand.PersistentFlags().BoolVarP(&acceptMulti, "accept-multiclient", "", false, "Allows a headless server to accept multiple client connections via JSON-RPC or DAP.")
|
||||
rootCommand.PersistentFlags().IntVar(&apiVersion, "api-version", 1, "Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md.")
|
||||
rootCommand.PersistentFlags().StringVar(&initFile, "init", "", "Init file, executed by the terminal client.")
|
||||
rootCommand.PersistentFlags().StringVar(&buildFlags, "build-flags", buildFlagsDefault, "Build flags, to be passed to the compiler. For example: --build-flags=\"-tags=integration -mod=vendor -cover -v\"")
|
||||
rootCommand.PersistentFlags().StringVar(&workingDir, "wd", "", "Working directory for running the program.")
|
||||
@ -170,8 +170,8 @@ option to let the process continue or kill it.
|
||||
// 'connect' subcommand.
|
||||
connectCommand := &cobra.Command{
|
||||
Use: "connect addr",
|
||||
Short: "Connect to a headless debug server.",
|
||||
Long: "Connect to a running headless debug server.",
|
||||
Short: "Connect to a headless debug server with a terminal client.",
|
||||
Long: "Connect to a running headless debug server with a terminal client.",
|
||||
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
|
||||
if len(args) == 0 {
|
||||
return errors.New("you must provide an address as the first argument")
|
||||
@ -185,20 +185,22 @@ option to let the process continue or kill it.
|
||||
// 'dap' subcommand.
|
||||
dapCommand := &cobra.Command{
|
||||
Use: "dap",
|
||||
Short: "[EXPERIMENTAL] Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).",
|
||||
Long: `[EXPERIMENTAL] Starts a headless TCP server communicating via Debug Adaptor Protocol (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 vscode to connect and request a binary
|
||||
to be launched or process to be attached to. The following modes can be specified via client's launch config:
|
||||
- launch + exec (executes precompiled binary, like 'dlv exec')
|
||||
- launch + debug (builds and launches, like 'dlv debug')
|
||||
- launch + test (builds and tests, like 'dlv test')
|
||||
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')
|
||||
- launch + test (builds and tests, like 'dlv test')
|
||||
- launch + replay (replays an rr trace, like 'dlv replay')
|
||||
- launch + core (replays a core dump file, like 'dlv core')
|
||||
- attach + local (attaches to a running process, like 'dlv attach')
|
||||
- launch + core (replays a core dump file, like 'dlv core')
|
||||
- attach + local (attaches to a running process, like 'dlv attach')
|
||||
|
||||
Program and output binary paths will be interpreted relative to dlv's working directory.
|
||||
|
||||
The server does not yet accept multiple client connections (--accept-multiclient).
|
||||
This server does not accept multiple client connections (--accept-multiclient).
|
||||
Use 'dlv [command] --headless' instead and a DAP client with attach + remote config.
|
||||
While --continue is not supported, stopOnEntry launch/attach attribute can be used to control if
|
||||
execution is resumed at the start of the debug session.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user