Breeze provides debugging support for Airflow components using the --debug and --debugger flags
in the breeze start-airflow command.
To start Airflow with debugging enabled, use the --debug flag to specify which components you want to debug:
# Debug the scheduler
breeze start-airflow --debug scheduler
# Debug multiple components
breeze start-airflow --debug scheduler --debug triggerer
# Debug all components
breeze start-airflow --debug scheduler --debug triggerer --debug api-server --debug dag-processor
# Debug with CeleryExecutor
breeze start-airflow -b postgres -P 17 --executor CeleryExecutor --debug scheduler --debug dag-processor --debug api-server --debug triggerer --debug celery-worker
# Debug Webserver for Airflow 2.x
breeze start-airflow --debug webserver- scheduler - The Airflow scheduler that monitors Dags and triggers task instances
- triggerer - The triggerer service that handles deferred tasks and triggers
- api-server - The Airflow REST API server
- dag-processor - The Dag processor service (when using standalone Dag processor)
- edge-worker - The edge worker service (when using EdgeExecutor)
- celery-worker - Celery worker processes (when using CeleryExecutor)
Breeze supports two debugger options:
- debugpy (default)
- pydevd-pycharm
# Use debugpy (default)
breeze start-airflow --debug scheduler --debugger debugpy
# Use PyCharm debugger
breeze start-airflow --debug scheduler --debugger pydevd-pycharmBy default, breeze start-airflow uses tmux to manage multiple Airflow components. You can use
mprocs as an alternative process manager with the --use-mprocs flag:
# Use mprocs instead of tmux
breeze start-airflow --use-mprocs
# Use mprocs with debugging
breeze start-airflow --use-mprocs --debug scheduler --debug triggererBenefits of mprocs:
- Modern TUI with intuitive navigation
- Better keyboard shortcuts and mouse support
- Easier process management (start/stop/restart individual processes)
- Cleaner visual layout with process status indicators
- Cross-platform compatibility
Install Required Extensions
Install the following VSCode extensions: * Python (ms-python.python) * Python Debugger (ms-python.debugpy)
Create Launch Configuration
Create or update your
.vscode/launch.jsonfile. The easiest way is to run the setup script:python setup_vscode.py
This will create debug configurations for all Airflow components. Here's an example configuration for the scheduler:
{ "name": "Debug Airflow Scheduler", "type": "debugpy", "request": "attach", "justMyCode": false, "connect": { "host": "localhost", "port": 50231 }, "pathMappings": [ { "localRoot": "${workspaceFolder}", "remoteRoot": "/opt/airflow" } ] }Port Mapping
Each component uses a different debug port. These ports are automatically assigned by Breeze when you start Airflow with debugging enabled:
- Scheduler: 50231
- Dag Processor: 50232
- Triggerer: 50233
- API Server: 50234
- Celery Worker: 50235
- Edge Worker: 50236
- Web Server: 50237
These ports are exposed from the Breeze container to your host machine, allowing your IDE to connect to the debugger running inside the container.
Start Airflow with Debug Support
breeze start-airflow --debug scheduler --debugger debugpy
Set Breakpoints
In VSCode, set breakpoints in your Airflow code by clicking in the gutter next to line numbers.
Attach Debugger
- Open the Debug panel in VSCode (Ctrl+Shift+D / Cmd+Shift+D)
- Select the appropriate debug configuration (e.g., "Debug Airflow Scheduler")
- Click the green play button or press F5
Trigger Debugging
Perform an action that will trigger the code path with your breakpoint:
- For scheduler: Trigger a Dag or wait for scheduled execution
- For API server: Make an API call
- For triggerer: Create a deferred task
- For Dag processor: Parse a Dag file
Debug Session
Once the breakpoint is hit:
- Inspect variables in the Variables panel
- Use the Debug Console to evaluate expressions
- Step through code using F10 (step over), F11 (step into), F12 (step out)
- Continue execution with F5