Can't debug django app


I can't find answer on this forums, so i hope i didn't overlooked the answer.
In my Django i have:
#!/usr/bin/env python

import socket
from pydev import pydevd
print 'connecting to debug server'
pydevd.settrace('', port=22000, stdoutToServer=True, stderrToServer=True, suspend=False)
print 'connected to debug server'

from import execute_manager
import imp
    imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
    import sys
    sys.stderr.write("Error: Can't find the file '' in the directory containing %r. It appears you've customized things.\nYou'll have to run, passing it your settings module.\n" % __file__)

import settings

if __name__ == "__main__":

When I start debug server in PyCharm gets connected to it:
Waiting for connection...
Starting debug server at port 22000
Connected to pydev debugger (build 121.224)
connected to debug server

But it just stops there. Django debug "runserver" doesn’t even start. In my Linux shell I notice that tries to connect twice to debug server. This is output from shell:
/home/WebVoip/ runserver –adminmedia=/home/WebVoip/templates/media/
connecting to debug server
connected to debug server
connecting to debug server

I have no breakpoints enabled. What am I doing wrong?
Thank you.
Comment actions Permalink
Hi Uroš,
could you please also disable exception breakpoints and try one more time (Run | View Breakpoints -> Python Exception Breakpoints ).

If it doesn't help. Please add environment variable PYCHARM_DEBUG = True to your run configuration, press debug and provide console output.
Comment actions Permalink

Thank you for your answer. I solved this with –noreload.

Please sign in to leave a comment.