用法

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

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

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.

​ 您可以根据需要通过多种方式调用 Delve。Delve 力求为用户提供便利,确保用户以最少的操作即可开始调试程序。

The available commands can be grouped into the following categories:

可用命令可分为以下几类:

The above list may be incomplete. Refer to the auto-generated complete usage document to further explore all available commands.

​ 上述列表可能不完整。请参阅自动生成的完整使用文档以进一步探索所有可用命令。

环境变量 Environment variables

Delve also reads the following environment variables:

​ Delve 还会读取以下环境变量:

  • $DELVE_EDITOR is used by the edit command (if it isn’t set the $EDITOR variable is used instead)
    • $DELVE_EDITORedit 命令使用(如果未设置,则使用 $EDITOR 变量)
  • $DELVE_PAGER is used by commands that emit large output (if it isn’t set the $PAGER variable is used instead, if neither is set more is used)
    • $DELVE_PAGER 由输出大量内容的命令使用(如果未设置,则使用 $PAGER 变量,如果两者都未设置,则使用 more
  • $TERM is used to decide whether or not ANSI escape codes should be used for colorized output
    • $TERM 用于决定是否使用 ANSI 转义码来输出带颜色的内容
  • $DELVE_DEBUGSERVER_PATH is used to locate the debugserver executable on macOS
    • $DELVE_DEBUGSERVER_PATH 用于在 macOS 上定位 debugserver 可执行文件
最后修改 December 9, 2024: 更新 (e04502d)