Is there a way to use python debugger in airflow dags?

552 Views Asked by At

I am running airflow locally without docker or helm, and am using SequentialExecutor as the executor, I want to use pdb or ipdb debugger inside callable functions of PythonOperator. is there a way for it?

2

There are 2 best solutions below

0
Georgy Bachakashvili On

Don't think so, but there actually is a debug executor

0
Nimrod Morag On

which airflow version are you running?

since version 2.5 you can debug locally without any executors with dag.test()

https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/executor/debug.html#testing-dags-with-dag-test

(if you don't already have a local DB, initialize it with airflow db check && airflow db migrate)