-
Notifications
You must be signed in to change notification settings - Fork 8
Instructions to setup Remote Debug with PyCharm
vedlad edited this page Feb 8, 2014
·
1 revision
- Make sure you have the exact project codebase in your host computer as you VM
- Download PyCharm and add your project by clicking on "Add Directory" or something like it.
- At the top right of your IDE's window, Click on the dropdown menu and select "Edit Configurations"
- Click on "+" at the top left and select "Python Remote Debug".
- Enter a random unused port number in the "Port:" field and Hit OK
- Locate the pycharm-debug.egg file on your system (It should have been bundled with your PyCharm) and SCP it to your VM. After that "easy_install" that file on your VM from the VM's shell.
- Get back to PyCharm and click on the Green Bug Icon. A Debug tab should pop up from below and display "Waiting for connection..."
- On your VM, get to your devstack "screens" by running ./rejoinstack.sh . Then get to your Keystone screen and kill the process by hitting Ctrl+C. After that Hit the Up key and modify the startup command to include --pydev-debug-host [YOUR HOST'S IP] --pydev-debug-port [THE PORT YOU HAD ENTERED IN PYCHARM]
Example: cd /opt/stack/keystone && /opt/stack/keystone/bin/keystone-all --config-file /etc/keystone/keystone.conf --log-config /etc/keystone/logging.conf -d --debug --pydev-debug-host 192.168.56.1 --pydev-debug-port 5678 || echo "key failed to start" | tee "/opt/stack/status/stack/key.failure"