OPA Ecosystem / Debugging Rego

Debugging Rego

Regal

The Linter of Rego Language by Styra

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 Regal Details

VS Code Extension

OPA Integration for the VS Code editor by Styra

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 VS Code Extension Details

OPA Errors

OPA error message reference by Styra

OPA Errors is a guide aimed at helping users debug OPA errors by documenting common errors and fixes in detail.
View OPA Errors Details

OPA Playground

Online Rego Playground by Styra

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 OPA Playground Details

rego-test-assertions

Helper functions for unit testing Rego by Anders Eknert

The rego-test-assertions library is designed to make debugging Rego tests easier.
View rego-test-assertions Details

Integrations are ordered by the amount of linked content.

Do you have an OPA-based project or integration to share? Follow these instructions to get it listed or go to the #ecosystem channel in the OPA Slack if you have any questions.