dlv

原文:https://github.com/go-delve/delve/blob/master/Documentation/usage/dlv.md

收录该文档时间: 2024-12-09T08:04:45+08:00

dlv

Delve is a debugger for the Go programming language.

​ Delve 是用于 Go 编程语言的调试器。

Synopsis

Delve is a source level debugger for Go programs.

​ Delve 是一个面向 Go 程序的源代码级调试器。

Delve enables you to interact with your program by controlling the execution of the process, evaluating variables, and providing information of thread / goroutine state, CPU register state and more.

​ Delve 允许您通过控制进程执行、评估变量以及提供线程/协程状态、CPU 寄存器状态等信息与程序进行交互。

The goal of this tool is to provide a simple yet powerful interface for debugging Go programs.

​ 此工具的目标是为 Go 程序调试提供一个简单但强大的界面。

Pass flags to the program you are debugging using --, for example:

​ 可以使用 -- 将标志传递给您正在调试的程序,例如:

dlv exec ./hello -- server --config conf/config.toml

Options

  -h, --help   help for dlv

SEE ALSO

  • dlv attach - Attach to running process and begin debugging.
    • dlv attach - 附加到正在运行的进程并开始调试。
  • dlv connect - Connect to a headless debug server with a terminal client.
    • dlv connect - 使用终端客户端连接到无界面调试服务器。
  • dlv core - Examine a core dump.
  • dlv dap - Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
    • dlv dap - 启动一个使用调试适配器协议(DAP)通信的无界面 TCP 服务器。
  • dlv debug - Compile and begin debugging main package in current directory, or the package specified.
    • dlv debug - 编译并开始调试当前目录的主程序包或指定的程序包。
  • dlv exec - Execute a precompiled binary, and begin a debug session.
    • dlv exec - 执行预编译的二进制文件,并开始调试会话。
  • dlv replay - Replays a rr trace.
  • dlv test - Compile test binary and begin debugging program.
    • dlv test - 编译测试二进制文件并开始调试程序。
  • dlv trace - Compile and begin tracing program.
  • dlv version - Prints version.
  • dlv log - Help about logging flags
    • dlv log - 关于日志标志的帮助信息。
  • dlv backend - Help about the --backend flag
    • dlv backend - 关于 --backend 标志的帮助信息。
最后修改 December 9, 2024: 更新 (e04502d)