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.
- Intellij IDEA Ultimate (opens in a new tab) or PyCharm Professional (opens in a new tab)
- Docker plugin (opens in a new tab)
- Python plugin (opens in a new tab) (this is needed for Intellij)
- Docker Desktop (opens in a new tab)
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:
Define a Docker-based remote interpreter.
Go to: File -> Project Structure... -> Platform Settings -> SDKs -> +
- Set Server to
- Set Configuration files to
- Set Python interpreter path to
After clicking OK the Remote Python Docker Compose should be listed as an SDK.
See screenshots below:
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.pyscript
- Make sure to select Use specified interpreter set the Remote Python Docker Compose (created in the previous section)
FIDES__CONFIG_PATH=/fidesto Environment variables
See screenshot below:
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:
Screenshot of hit breakpoint below: