Unfortunately, most solutions don't work on Windows. (There was a separate question specifically about that, but unfortunately it got closed as a duplicate of this one. So I'll answer that question here now.)
The problem is that on Windows, the standalone celery command is a batch file, so PyCharm cannot attach the Python debugger to it.
Up until Celery 3.x, you can create a manage.py
run configuration and call the celery worker
command on it.

Note that you don't need to set --app
here, as the application is defined by the management command via DJANGO_SETTINGS_MODULE
.
Unfortunately, the celery
management command was a feature of the django-celery
library, which isn't supported by Celery 4.x. As of yet, I haven't found a solution for Celery 4.x.