github.com/neilgarb/delve@v1.9.2-nobreaks/Documentation/usage/dlv_dap.md (about)

     1  ## dlv dap
     2  
     3  Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
     4  
     5  ### Synopsis
     6  
     7  Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
     8  
     9  The server is always headless and requires a DAP client like VS Code to connect and request a binary
    10  to be launched or a process to be attached to. The following modes can be specified via the client's launch config:
    11  - launch + exec   (executes precompiled binary, like 'dlv exec')
    12  - launch + debug  (builds and launches, like 'dlv debug')
    13  - launch + test   (builds and tests, like 'dlv test')
    14  - launch + replay (replays an rr trace, like 'dlv replay')
    15  - launch + core   (replays a core dump file, like 'dlv core')
    16  - attach + local  (attaches to a running process, like 'dlv attach')
    17  
    18  Program and output binary paths will be interpreted relative to dlv's working directory.
    19  
    20  This server does not accept multiple client connections (--accept-multiclient).
    21  Use 'dlv [command] --headless' instead and a DAP client with attach + remote config.
    22  While --continue is not supported, stopOnEntry launch/attach attribute can be used to control if
    23  execution is resumed at the start of the debug session.
    24  
    25  The --client-addr flag is a special flag that makes the server initiate a debug session
    26  by dialing in to the host:port where a DAP client is waiting. This server process
    27  will exit when the debug session ends.
    28  
    29  ```
    30  dlv dap [flags]
    31  ```
    32  
    33  ### Options
    34  
    35  ```
    36        --client-addr string   host:port where the DAP client is waiting for the DAP server to dial in
    37    -h, --help                 help for dap
    38  ```
    39  
    40  ### Options inherited from parent commands
    41  
    42  ```
    43        --accept-multiclient               Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
    44        --allow-non-terminal-interactive   Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
    45        --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)
    46        --backend string                   Backend selection (see 'dlv help backend'). (default "default")
    47        --build-flags string               Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
    48        --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)
    49        --disable-aslr                     Disables address space randomization
    50        --headless                         Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
    51        --init string                      Init file, executed by the terminal client.
    52    -l, --listen string                    Debugging server listen address. (default "127.0.0.1:0")
    53        --log                              Enable debugging server logging.
    54        --log-dest string                  Writes logs to the specified file or file descriptor (see 'dlv help log').
    55        --log-output string                Comma separated list of components that should produce debug output (see 'dlv help log')
    56        --only-same-user                   Only connections from the same user that started this instance of Delve are allowed to connect. (default true)
    57    -r, --redirect stringArray             Specifies redirect rules for target process (see 'dlv help redirect')
    58        --wd string                        Working directory for running the program.
    59  ```
    60  
    61  ### SEE ALSO
    62  
    63  * [dlv](dlv.md)	 - Delve is a debugger for the Go programming language.
    64