4
votes

I am trying to set up Pycharm3.0 to be able to debug the django project.. I cannot get it to work. Any help is greatly appreciated..! :-)

I checked the django support is there: enter image description here

I then configured the Run/debug configuration settings as following:

enter image description here

. sitee is the project folder.

When I hit the debug button, I got error:

/usr/bin/python2.7 manage.py runserver /home/tee/Downloads/pycharm-3.0.2/helpers/pydev/pydevd.py --multiproc --client 127.0.0.1 --port 40239 --file /home/tee/PycharmProjects/sitee/account/views.py Usage: manage.py runserver [options] [optional port number, or ipaddr:port]

Starts a lightweight Web server for development and also serves static files.

manage.py: error: no such option: --multiproc

Process finished with exit code 2

2
What OS are you using? That looks way different from my PyCharm setup dialog.Rob L
The command should look more like this: /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python /Applications/PyCharm.app/helpers/pydev/pydevd.py --multiproc --client 127.0.0.1 --port 58654 --file /Users/<username>/PycharmProjects/<project_name>/manage.py runserver 8000Rob L
Leave interpreter options and working directory blank. You may need to add your settings.py to environment variables, but PyCharm usually sets all that stuff automatically.Rob L
@RobL I am using linux ubuntu.user3108063
So it looks to me like the manage.py runserver 8000 command is being called first, rather than last. Perhaps you could try entering it in the PyCharm terminal? Not a fix, but it may give some clues.Rob L

2 Answers

1
votes

It looks as if you are trying to debug using the 'Python' Run/Debug configuration rather than the 'Django server'. Check your left hand column, the one that lists your Run/Debug configs and the defaults that PyCharm provides. Do you see "Django server"?

If so, clone that one and use it. You hardly need to specify any parameters, it does a lot with the defaults straight out of the box.

1
votes

I was doing the same thing with PyCharm 2019.I had no trouble. I set the script path to my manage.py file added runserver as the parameter and set the working directory to my source drive.

Run/Debug Config