I'm trying to debug Django project inside Vagrant.
I did searched for the answers and read all available documentations about Vagrant, Remote debugging with Pycharm and more.
What I do have now is perfectly working "Run" command
ssh://[email protected]:2222/home/vagrant/dev-projects/OP_3.0/bin/python2.7 -u
/home/vagrant/dev-projects/3.0/online_platform/manage.py runserver 8000
0 errors found
April 06, 2014 - 02:32:40
Django version 1.6.2, using settings 'local_settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
I can access to it from HOST, and everything works just as suposed to.
But when I'm trying run a "Debug" command I have this:
ssh://[email protected]:2222/home/vagrant/dev-projects/OP_3.0/bin/python2.7 -u
/home/vagrant/pydev/pydevd.py --multiproc --client '0.0.0.0' --port 34117 --file /home/vagrant/dev-projects/3.0/online_platform/manage.py runserver 8000
Traceback (most recent call last):
File "/home/vagrant/pydev/pydevd_comm.py", line 310, in OnRun
self.handleExcept()
File "/home/vagrant/pydev/pydevd.py", line 1414, in handleExcept
ReaderThread.handleExcept(self)
File "/home/vagrant/pydev/pydevd_comm.py", line 329, in handleExcept
GlobalDebuggerHolder.globalDbg.FinishDebuggingSession()
AttributeError: 'NoneType' object has no attribute 'FinishDebuggingSession'
Traceback (most recent call last):
File "/home/vagrant/pydev/pydevd.py", line 1497, in <module>
dispatcher.connect(host, port)
File "/home/vagrant/pydev/pydevd.py", line 1400, in connect
self.reader.run()
File "/home/vagrant/pydev/pydevd_comm.py", line 252, in run
self.OnRun()
File "/home/vagrant/pydev/pydevd_comm.py", line 325, in OnRun
self.handleExcept()
File "/home/vagrant/pydev/pydevd.py", line 1414, in handleExcept
ReaderThread.handleExcept(self)
File "/home/vagrant/pydev/pydevd_comm.py", line 329, in handleExcept
GlobalDebuggerHolder.globalDbg.FinishDebuggingSession()
AttributeError: 'NoneType' object has no attribute 'FinishDebuggingSession'
Process finished with exit code 1`
Any real help, please...
PyCharm supports the latest Django versions. The corresponding Python versions depend on Django.
Press Ctrl+Alt+S to open the IDE settings and select Plugins. Install the Vagrant plugin.
If you
Vagrant
referencing the right python executable within the vagrant boxthen you shouldn't have to fuss around with ssh
and with debugger command lines yourself anymore. Just tell PyCharm what you want to debug as if it were a local process. (Might work even better if you also let PyCharm know that it's dealing with a Django project.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With