The steps below describe how to set up interactive debugging with PyCharm.
Update k8s/base/app.configmap.yaml with data field PYTHONBREAKPOINT: "utils.pycharm_debugger"
In PyCharm:
- Go to 'Run' in the toolbar
- Click on 'Edit Configurations'
- Click on '+' in the top left of the dialog
- Select 'Python Debug Server'
- Set the host to 0.0.0.0 and the port to 6400, and the name as you see fit.
- For 'path mappings' set /path/to/rochescaf/backend=/app/src
- Check 'Redirect console output to console'
- Remove check on 'Suspend after connect'.
- Click 'Ok'
Before the code you want to debug, add the following:
breakpoint()You must then set break points in your IDE and call the code as usual to hit them.
