Skip to content
Developer Resources
Jetbrains Debugging

Debugging Fides in IntelliJ IDEA Ultimate

This guide will show how to use the IntelliJ debugger with Fides running in Docker. The setup for PyCharm Professional should be very similar.

Prerequisites

Setup

Connect to Docker daemon

This step will allow the IDE to connect to Docker Desktop.

Go to: Settings/Preferences -> Docker -> +

  • Select Docker for "your operating system"

See the screenshot below:

Screenshot of IDE Docker setup

Configure Python Remote Interpreter

Define a Docker-based remote interpreter.

Go to: File -> Project Structure... -> Platform Settings -> SDKs -> +

  • Set Server to Docker
  • Set Configuration files to .docker-compose.yml
  • Set Python interpreter path to python

After clicking OK the Remote Python Docker Compose should be listed as an SDK.

See screenshots below:

Screenshot of Add Python Interpreter

Screenshot of Project Structure SDKs

Run/Debug Configuration

Set up a Run/Debug Configuration so that breakpoints can be hit in the f sourcecode.

Go to: Run/Debug Configurations -> + -> Python

  • To debug Fides, debug the <path on your machine>/src/fides/main.py script
  • Make sure to select Use specified interpreter set the Remote Python Docker Compose (created in the previous section)
  • Add FIDES__CONFIG_PATH=/fides to Environment variables

See screenshot below:

Screenshot of Run/Debug Configuration for main.py

Hit a Breakpoint

Now the IDE is ready to debug the source code. Click the debug button for main (setup in the previous section).

Try firing a http request to Fides from Postman or Curl and hit a break point.

There is a postman collection in this repo: docs/fides/docs/development/postman/Fides.postman_collection.json

Screenshot of hit breakpoint below:

Screenshot of Debugging from IntelliJ

Links

The information is this guide is largely based on the pycharm (opens in a new tab) and interpeters (opens in a new tab).