Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pydev 3.0 + Eclipse + Google App Engine Debugging not working

I've been having problems getting debugging working with this setup for the past year. Supposedly, this is fixed in the latest versions, but I just can't seem to get it to work.

I'm using Mac OSX 10.8.5, Eclipse Keplar, PyDev 3.0.0, and Google App Engine 1.8.8.

I set up a run configuration to point to dev_appserver.py, running my project. That works fine. My python version is 2.7.3, and everything works in normal mode. When I try to run in debug mode, however, the app runs, the output specifically states:

pydev debugger: starting
pydev debugger: google app engine integration enabled

But after 20 seconds, the python process terminates with this error message:

'Launching New_configuration' has encountered a problem.
Timed out after 20.0 seconds while waiting for python script to connect.
Accept timed out

Execution works during those 20 seconds, because I can hit URLs connected to my app and see an effect. Breakpoints do not work, though. Is there something I need to do to get python to 'connect'?

Also - I should note that switching back to using 'old_dev_appserver.py' fixes this problem - debugging works fine when I do this. But, this is not really a solution, because I need to use the latest socket additions in the newer releases.

Thanks for any advice.

like image 897
Shaun Budhram Avatar asked Nov 24 '13 10:11

Shaun Budhram


2 Answers

temporary solution:

edit the pydev_app_engine_debug_startup.py file:

eclipse/plugins/org.python.pydev_${VERSION}/pysrc/pydev_app_engine_debug_startup.py

change the line that reads:

if ':' not in config.version_id:

to:

if ':' not in config.version_id or config.version_id.startswith('default:'):
like image 120
Marco Zoqui Avatar answered Sep 29 '22 11:09

Marco Zoqui


Looks like this is fixed in 1.9.0. I also had to make sure to update PyDev to the latest (3.3.3 at the time of this writing).

One more thing to add, and this one really tripped me up (on MacOS) - In Eclipse, under Run -> Run Configurations, set the Main Module to point to this location:

/usr/local/google_appengine/dev_appserver.py

NOT the symlink:

/usr/local/bin/dev_appserver.py
like image 42
Shaun Budhram Avatar answered Sep 29 '22 11:09

Shaun Budhram