Skip to main content
Version: 2.0.0

Debug Mode

Knowing why some decisions were made by your PDP can be a crutial part of buidling and understanding your policies, especially when you encounter unexpected results. That's what Debug Mode is here for.

What is Debug mode?

Permit's Debug Mode adds additional debug information to your decision logs, allowing for an in-depth analysis of the decisions made by your PDP.

The advantages of Debug Mode

On top of standard log information provided by our Audit Logs, Debug Mode allows us to understand -

  • Why a decision was made
  • Which policy was taken into consideration for the evaluation process
  • What are the policies currently configured in your environment

This information gives you a more granular understanding of any decision made by the PDP.


Turning on Debug Mode will impact policy evaluation latency. Thus, it is recommended to disable Debug Mode when running in production.

Activating Debug Mode

There are two possible ways to activate Debug Mode:

Through the PDP environment variables:

When running your PDP, set the environment variable PDP_DEBUG=True as part of the PDP deployment. This will activate Debug Mode for this specific PDP.

Here's an example of such a PDP deployment:

docker run -it \
-p 7766:7000 \
--env PDP_DEBUG=True

This configuration will only enable Debug Mode in the PDP itself and not across your environment.

Through the UI (Coming Soon)

Another option to enable Debug Mode is through Permit's UI. To do that:

  1. Go to your Permit dashboard and make sure you have the relevant project and environment selected.
  2. Next, go to the Audit Log screen.
  3. In the top right corner, click on Settings.
  4. Click the toggle to enable Debug Mode.