Skip to main content

Debugging - Temporal Go SDK feature guide

You can use a debugger tool provided by your favorite IDE to debug your Workflow Definitions prior to testing or executing them.

The Temporal Go SDK includes deadlock detection which fails a Workflow Task in case the code blocks over a second without relinquishing execution control. Because of this you can often encounter a PanicError: Potential deadlock detected while stepping through Workflow Definitions during debugging.

To alleviate this issue, you can set the TEMPORAL_DEBUG environment variable to true before debugging your Workflow Definition.

note

Make sure to set TEMPORAL_DEBUG to true only during debugging.

Debug in a development environment

How to debug in a development environment using the Go SDK

In addition to the normal development tools of logging and a debugger, you can also see what's happening in your Workflow by using the Web UI or Temporal CLI.

Debug in a production environment

How to debug in a production environment using the Go SDK

You can debug production Workflows using:

You can debug and tune Worker performance with metrics and the Worker performance guide. For more information, see Metrics for setting up SDK metrics.

Debug Server performance with Cloud metrics or self-hosted Server metrics.