use of debugpy to run airflow components via breeze #51763
+101
−34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using debugpy to run airflow components so that we can use IDE's as Vscode to attach to the component to debug.
Ports for components are as follows:
Env variables to use debugpy to run a component are below
When using breeze, we can add above env to
files/airflow-breeze-config/environment_variables.env
.For example, to run the scheduler via debugpy:
debugpy will be listening at port 50231. I use VS Code. So, I can add the following to the configuration in "launch.json" and start debugging:
Once I start breeze, the Scheduler pane will be waiting as shown in the screenshot:

In VSCode, I can place an arbitrary debug point and start debugging and it will pause as shown below:
I am sure this can be done via PyCharm as well, but I haven't tested it yet.