Debugging Rego
Debugging Rego policies can be tricky. These projects and tools can help you work out what's going on.

Regal
Regal can be used to debug Rego policies by identifying common mistakes. See Bugs for some example issues it can identify automatically.
Regal also implements a language server and debug adapter for Rego to allow clients to debug Rego code as users type.
View Details
VS Code Extension
The extension provides support for debugging Rego policies using the native VS Code debugging interface. This is based on Regal's Debug Adapter, see the VS Code documentation to get started.
View Details
OPA Errors
OPA Errors is a guide aimed at helping users debug OPA errors by documenting common errors and fixes in detail.
View Details
OPA Playground
The playground is a great place to debug Rego policies as you can quickly iterate on the policy and data at the same time before sharing links to collaborate on a fix with others.
View Details
rego-test-assertions
The rego-test-assertions library is designed to make debugging Rego tests easier.
View Details