How do I start up remote debugging with PyCharm?

Viewed 53915

I'm trying to get debugging up between PyCharm (on windows host) and a debian virtual host running my django application. The instructions say to install the egg, add the import, and then invoke a command. I assume these things need to be done on the debian host?

Ok, then, in what file should I put these two lines?

from pydev import pydevd
pydevd.settrace('not.local', port=21000, stdoutToServer=True, stderrToServer=True)

I tried putting it into the settings.py but got this kind of thing...

File "/django/conf/__init__.py", line 87, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
File "/django/utils/importlib.py", line 35, in import_module
    __import__(name)
File "/settings.py", line 10, in <module>
    pydevd.settrace('dan.local', port=21000, stdoutToServer=True, stderrToServer=True)
File "/pycharm-debug.egg/pydev/pydevd.py", line 1079, in settrace
    debugger.connect(host, port)
File "/pycharm-debug.egg/pydev/pydevd.py", line 241, in connect
    s = StartClient(host, port)
File "/pycharm-debug.egg/pydev/pydevd_comm.py", line 362, in StartClient
    sys.exit(1)
SystemExit: 1

Whilst pycharm just sat there "waiting for connection"

3 Answers
Related