mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 05:42:09 +02:00
dlv: add page (#6697)
This commit is contained in:
parent
371d2c8997
commit
d08564637d
1 changed files with 28 additions and 0 deletions
28
pages/common/dlv.md
Normal file
28
pages/common/dlv.md
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# dlv
|
||||||
|
|
||||||
|
> Debugger for the Go programming language.
|
||||||
|
> More information: <https://github.com/go-delve/delve/blob/master/Documentation/usage/dlv.md>.
|
||||||
|
|
||||||
|
- Compile and begin debugging the main package in the current directory (by default, with no arguments):
|
||||||
|
|
||||||
|
`dlv debug`
|
||||||
|
|
||||||
|
- Compile and begin debugging a specific package:
|
||||||
|
|
||||||
|
`dlv debug {{package}} {{arguments}}`
|
||||||
|
|
||||||
|
- Compile a test binary and begin debugging the compiled program:
|
||||||
|
|
||||||
|
`dlv test`
|
||||||
|
|
||||||
|
- Connect to a headless debug server:
|
||||||
|
|
||||||
|
`dlv connect {{ip_address}}`
|
||||||
|
|
||||||
|
- Attach to a running process and begin debugging:
|
||||||
|
|
||||||
|
`div attach {{pid}}`
|
||||||
|
|
||||||
|
- Compile and begin tracing a program:
|
||||||
|
|
||||||
|
`dlv trace {{package}} --regexp '{{regular_expression}}'`
|
Loading…
Add table
Reference in a new issue