https://stackoverflow.com/questions/27269574/how-to-run-debug-server-for-django-project-in-pycharm-community-edition



Has anyone had issues setting up a debug configuration for Django project in PyCharm Community Edition? Community Edition of the IDE is lacking the project type option on project setup and then when I am setting up Debug or Run config it asks me for a script it should run. What script would it be for Django, manage.py? Thanks in advance

  • It works. Please read the answers below, not the comments above. – guettli Sep 23 '15 at 8:48
  • I notice that server breakpoints are masked when client breakpoints are present. Try removing all client breakpoints to see your server breakpoints get hit. – Steve Elmer Apr 12 '17 at 14:56
  • Judicious use of sleep() in the client code prevents the browser from breaking the connection while you're in the debugger on the server. – Steve Elmer Apr 12 '17 at 15:08
101

Yes you can.

  1. In Run -> Edit Configurations create new configuration
  2. Script: path_to/manage.py
  3. Script parameters: runserver
  • Great thanks @Zlatko Rončević, I worked out the answer shortly after I posted the question but never updated it here - yours is exactly what worked for me. I am sorry I won't be able to vote it up as I have too small reputation :( But I would if I had it. Other people viewing this question please do so. – emkorybski Feb 23 '15 at 22:15 
  • 1
    If you have environment variables, you should run PyCharm with the constants set from command line. – anizzomc Apr 24 '15 at 13:51
  • @Zlatko Rončević it is not working for debug mode – niran Apr 23 '16 at 18:43
  • 1
    @niran for debug just start same configuration with Debug command (Run -> Debug) – Zlatko Rončević Apr 25 '16 at 7:44
  • 1
    @ZlatkoRončevi same thing I followed debugger is starting but when I open browser and debugger is not bringing cursor to the break points – niran Apr 26 '16 at 3:22


+ Recent posts