Debugging (pdb) with Celery

Is it possible to add a pdb statement in Celery?
Yes, but a bit different than your ordinairy pdb.set_trace() command:

from celery.contrib import rdb
rdb.set_trace()


Now in the terminal you can telnet to the tracepoint like so:

$ telnet localhost 6900


At first you probably have to type a few nexts by typing n. But then you're in!

Read more documentation about debugging with Celery.