Environment variables
Most users do not need these settings. The defaults work for a local debugd and the standard debug image. Use them to solve a port conflict, to get more detailed logs, or to test another debug image.
Set the variables in the environment of the process that reads them. debugd reads its settings when it starts. Restart debugd after a change.
debugd
| Variable | Default | Description |
|---|---|---|
DEBUG_DAEMON_PORT | 58090 | The port where debugd listens. Change it when another program uses 58090. Set the same port in debugctl (same variable) and in the IDE plugin settings. |
DEBUG_DAEMON_ADDR | 127.0.0.1 | The address where debugd listens. The default accepts connections from your machine only. Change it only when debugd must accept connections from another host, and then protect the port with a firewall: the /v1/auth/* routes have no authentication. |
LOG_LEVEL | info | The level of the console log: trace, debug, info, warn or error. It does not change the log file, which uses debug (or trace in verbose mode). See Logs and files. |
ENABLE_VERBOSE_DEBUG_LOGS | false | true sets the console log to debug and the log file to trace. The log file then also contains each status request and each health check. The same as debugd --verbose. |
DEBUG_IMAGE | madhavhugar/debughero:0.0.9 | The image of the debug container. Use it to pull the image from a mirror registry. The image must have the same API as the default image (0.0.9 or later). Older images cannot stop a session. |
DLV_POLL_INTERVAL | 10s | How often debugd checks the health of Delve. A Go duration, for example 30s. |
CONTAINER_WATCH_INTERVAL | 5s | How often debugd checks that the debug container still runs. A Go duration. |
EPHEMERAL_SERVER_PORT | 45001 | The port of the server in the debug container. Change it only together with a debug image that uses another port. |
DLV_LAUNCH_MODE is removed. debugd always asks the server in the debug container to start Delve. If DLV_LAUNCH_MODE is set, debugd logs a warning and ignores it.
debugctl
| Variable | Default | Description |
|---|---|---|
DEBUG_DAEMON_PORT | 58090 | The port of debugd. debugctl connects to http://localhost:<port>. |
DEBUGD_URL | http://localhost:<DEBUG_DAEMON_PORT> | The full URL of debugd. Use it only when debugd runs on another host. |
KUBECONFIG | ~/.kube/config | The kubeconfig for debugctl debug, the same as for kubectl. A list of files separated by : is merged. The --kubeconfig flag has priority. debugctl sends the value to debugd. See Which cluster DebugHero uses. |
debugd flags
| Flag | Description |
|---|---|
--verbose | The same as ENABLE_VERBOSE_DEBUG_LOGS=true. |
IDE plugins
The IDE plugins do not read these variables, except KUBECONFIG. The plugins prefill the Kubeconfig path field with KUBECONFIG of the IDE environment, else ~/.kube/config. VS Code and GoLand load the environment of your login shell when they start. After you change KUBECONFIG, restart the IDE and check the field: the form keeps the last value that you submitted.
The plugins have their own setting for the port of debugd:
| IDE | Setting | Default |
|---|---|---|
| VS Code | debughero.port | 58090 |
| GoLand | Settings › Tools › DebugHero › debugd port | 58090 |