![]() 1. return an error when SetUProbe fails, while creating ebpf tracepoints 2. if no tracepoint can be set for 'dlv trace' exit early 3. never leave the traced program running 4. fix typo in description of --ebpf flag Fixes #3006 |
||
---|---|---|
.. | ||
dlv_attach.md | ||
dlv_backend.md | ||
dlv_connect.md | ||
dlv_core.md | ||
dlv_dap.md | ||
dlv_debug.md | ||
dlv_exec.md | ||
dlv_log.md | ||
dlv_redirect.md | ||
dlv_replay.md | ||
dlv_run.md | ||
dlv_test.md | ||
dlv_trace.md | ||
dlv_version.md | ||
dlv.md | ||
README.md |
Using Delve
You can invoke Delve in multiple ways, depending on your usage needs. Delve makes every attempt to be user-friendly, ensuring the user has to do the least amount of work possible to begin debugging their program.
The available commands can be grouped into the following categories:
- Specify target and start debugging with the default terminal interface:
- Trace target program execution
- Start a headless backend server only and connect with an external frontend client:
- dlv --headless <command> <target> <args>
- starts a server, enters a debug session for the specified target and waits to accept a client connection over JSON-RPC or DAP
<command>
can be any ofdebug
,test
,exec
,attach
,core
orreplay
- if
--headless
flag is not specified the default terminal client will be automatically started instead - compatible with dlv connect, VS Code Go, GoLand
- dlv dap
- starts a DAP-only server and waits for a DAP client connection to specify the target and arguments
- compatible with VS Code Go
- NOT compatible with dlv connect, GoLand
- dlv connect <addr>
- starts a terminal interface client and connects it to a running headless server over JSON-RPC
- dlv --headless <command> <target> <args>
- Help information
The above list may be incomplete. Refer to the auto-generated complete usage document to further explore all available commands.