- I have a django project that runs fine (both locally and on a remote server).
- I start pycharm locally using a "remote debugging" profile and it looks fine.
- I see "Starting debug server at port 4000"...... "Waiting for connection"
- On the remote server, I put the appropriate call to pycharm-debug.egg in __init__.py (but I've put it other places in the code, too). More detail included below.
- I start the remote server and on the local pycharm IDE/debugger I see:
- "Connected to pydev debugger (build 133.1347)"
- After this, things just sit there... I don't get any feedback on where execution is and no ability in the pycharm IDE to "start/continue/run" anything.
- On the remote server if I <ctrl-c> it, I see:
- File "/<path here>/pycharm-debug.egg/pydevd.py", line 1256, in settrace
- File "/<path here>/pycharm-debug.egg/pydevd.py", line 1305, in _locked_settrace
My guess is that everything is connected properly but I am not seeing a way to start everything running. I have "suspend=False" so I would have expected it to start (more details below). When I try to bring up a page against the remote server, I get "not connected" so the web server is obviously not running yet. Without remote debugging, this works fine.
What am I doing wrong? :) Thanks!
- Remote server that is running the code/process I want to debug:
- In main __init__.py I have :
- import os
- import sys
- BASE_DIR = os.path.dirname(os.path.dirname(__file__))
- sys.path.append(BASE_DIR + '/pycharm-debug.egg')
- import pydevd
- pydevd.settrace('<my local machine's public ip addr>', port=4000, suspend=False)
- Local pycharm IDE shows this:
- Starting debug server at port 4000
- Use the following code to connect to the debugger:
- import pydevd
- pydevd.settrace('localhost', port=4000, suspend=False) (tried with <public ip addr> for this, too.
- Waiting for connection...
- —- and then, after I start the remote server process: —-
- Connected to pydev debugger (build 133.1347)
- I've tried this both using virtualenv and not on the remote server.
- I'm running the local pycharm IDE behind a normal Comcast cable modem router with port-forwarding for port 4000 turned on (and tested this with a node server attaching to port 4000 and worked fine when I did a wget against it from my remote server).
I'm at a loss as to how to "bump" anything to get things running and let me start debugging.
Thanks for trying to help.