Troubleshooting
Find your symptom in the tables. The messages are the real messages of debugd, debugctl and Delve.
Where to look
| Source | Command | Contains |
|---|---|---|
| Session status and errors | debugctl get sessions | STATUS and LAST_ERRORS for each session |
debugd log | ~/.debughero/logs/debugd.log | Each step of each session. Start debugd --verbose for more detail. |
| Delve log | debugctl logs <session-id> | The Delve output in the debug container |
| Pod events | kubectl describe pod <pod> -n <namespace> | Image pull and container errors of the debughero-... container |
debugd
| Symptom | Cause | Fix |
|---|---|---|
failed to start debug session - make sure debugd is running and reachable at http://localhost:58090 | debugd does not run, or it uses another port. | Start debugd. If you changed its port, set the same DEBUG_DAEMON_PORT for debugctl. |
cannot start debugd: address :58090 is already in use - set DEBUG_DAEMON_PORT to a free port and restart | Another program uses port 58090. | Set DEBUG_DAEMON_PORT to a free port for debugd, debugctl, and in the IDE settings. |
| The IDE shows "debugd isn't running" | The IDE uses another port than debugd. | Check debughero.port (VS Code) or Settings › Tools › DebugHero (GoLand). |
| All sessions are gone | debugd restarted. It keeps sessions in memory. | Start a new session. The old debug containers stay in their pods until they stop. |
Login
| Symptom | Cause | Fix |
|---|---|---|
Already logged in as: <email> | You are logged in. | To change the user, run debugctl logout first. |
| The browser does not open | No default browser, or a remote shell. | debugctl login prints the URL. Open it manually. |
401 Unauthorized from debugd | The access token expired and the refresh failed. | Run debugctl login again, or sign in again in the IDE. |
Session start
| Symptom | Cause | Fix |
|---|---|---|
session limit reached: N/M sessions in the last 24h (or 7 days) | Your plan limits the number of sessions. | Wait, or change your plan. The IDE shows a View plans button. |
LAST_ERRORS: no pods found matching labels "..." in namespace "..." | The labels or the namespace are wrong. | Check with kubectl get pods -n <namespace> -l <labels>. |
LAST_ERRORS: missing kubernetes permissions in namespace "...": ... | RBAC. The message names each missing permission. | See Permissions. |
LAST_ERRORS: blocked by Pod Security Admission: ... | Pod Security Admission rejected the debug container. | See Admission policy exemptions. |
LAST_ERRORS: blocked by Kyverno: ..., blocked by OPA Gatekeeper: ..., or blocked by admission webhook "...": ... | Kyverno, Gatekeeper, or another webhook rejected the debug container. | See Admission policy exemptions. |
The status stays PENDING | The node cannot pull the debug image, or the node is arm64. debugd waits without a time limit. | Run kubectl describe pod. Look for ErrImagePull or ImagePullBackOff on the debughero-... container. On an arm64 node, the message says that no image matches the platform. See Image pull and Nodes. |
ephemeral debug container was OOM-killed while session was active | The debug container used too much memory. | Ask your admin about memory limits in the namespace (LimitRange). |
| The wrong pod or container is debugged | More than one pod matches, or the pod has more than one container. | Use labels that select one pod. Set the container name. |
| The wrong process is debugged | The target process is not PID 1. | Set the process name (--match-process). |
Delve
Symptom (in debugctl logs <session-id>) | Cause | Fix |
|---|---|---|
Version of Delve is too old for Go version go1.26... | The binary was built with a newer Go than Delve 1.25 supports. | See Go version. |
could not attach to pid ...: operation not permitted | The debug container has no SYS_PTRACE, or a security module (AppArmor, SELinux) blocks ptrace. | Check the admission policies and the security profile of the node. |
could not open debug info | The binary has no DWARF data. | See Stripped binaries. |
IDE and breakpoints
| Symptom | Cause | Fix |
|---|---|---|
The status is READY, but the IDE does not connect | The IDE uses an old port, or the port-forward stopped. | Run debugctl get sessions and check DEBUGGER_PORT. If the status is UNREACHABLE, check your network and VPN. |
| Breakpoints are unverified or not hit | Wrong source path mapping, or other source code than in the image. | See Map source paths. |
| Variables show "optimized away" | Optimized build. | Build with -gcflags="all=-N -l". See Optimized code. |
| The container restarts while you are at a breakpoint | The process does not answer the liveness probe while it is stopped. | Continue quickly, use conditional breakpoints, or increase the probe failureThreshold in a test environment. |
Session status
| Status | Meaning |
|---|---|
PENDING | The session is starting. |
READY | Delve is attached and answers. |
UNRESPONSIVE | The Delve process runs, but it does not answer. |
UNREACHABLE | debugd cannot reach the debug container, for example because the port-forward stopped. This can recover. |
COMPLETED | Delve stopped normally. |
EXPIRED | The session reached its time limit. |
FAILED | The session could not start, or Delve stopped with an error. See LAST_ERRORS. |