I'm trying to find some instructions on how to enable PyCharm debugging within my celery processes on a remote machine. The remote machine is running Ubuntu 14.04.
I am running PyCharm 4.x.
I've seen some other information that alludes others have it working, but haven't been able to locate any proper instructions.
Just right-click any line in the editor and select the Debug <filename> command from the context menu. After the program has been suspended, use the debugger to get the information about the state of the program and how it changes during running.
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.
First, I open my project in Eclipse and put a breakpoint at the beginning of the task function. Then, I'm starting the Celery workers from Eclipse by Right Clicking on manage.py from the PyDev Package Explorer and choosing "Debug As->Python Run" and specifying "celeryd -l info" as the argument.
With PyCharm you can debug your application using an interpreter that is located on the other computer, for example, on a web server or dedicated test machine. PyCharm provides two ways to debug remotely: Through a remote interpreter.
You can have a Run Configuration
to run your celery
workers which then allows you to debug simply by clicking the debug
button. Here is how I set that up in PyCharm 5:
You need to set up a remote python interpreter and then set other configs like the image above. Note that the Working directory
is pointing to the bin
folder of the remote interpreter with celery
installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With