How can I use PyCharm to locally debug a Celery wo

2019-02-08 04:34发布

This question already has an answer here:

I have an existing Django project with a virtualenv. After activating the venv, I can run Celery just with the command celery. This works on Windows, OS X and Linux.

I wanted to try PyCharm on Windows, and I'm able to get it to run my Django server (using the project's venv), but I also want to run Celery, so I can debug that as well.

I can't find a simple, straightforward guide to setting up PyCharm so I can debug Celery (in a manner will work with PyCharm on any platform).

1条回答
来,给爷笑一个
2楼-- · 2019-02-08 04:53

This is what I do to run celery

Go to Edit Configuration, then select the '+' icon to add new Python script and enter the celery path, other parameters and working directory. You can specify environment variables and bottom of that you have the option to select parent environment to include as well. Also, don't forget to choose your python interpreter for taking care of virtual environment.

running celery using pycharm

查看更多
登录 后发表回答