I admit: until now I was using just a text editor to create my Google App Engine (GAE) Web service.
But I know that as it gets more complex I will need a debugger. So I went after instructions and I found a great article by Joscha Feth that explains how to configure Eclipse and PyDev for debugging with GAE.
I was able to follow the instructions and debug a sample Hello World GAE application. It was easy.
There were just a couple caveats:
First, some commands seem to be different in Eclipse 3.4 than in the version that was used in the article. For instance, in Help -> Software Updates I couldn’t find a Find and Install command, but I was able to use the Add Site button instead. Also, there isn’t a Run -> Open Run Dialog command. I used Run -> Run Configurations.
Second, when I tried to debug I got this error: Variable references empty selection: ${project_loc}. I found out that I had to click on the project on the left panel and then click on the debug button and select my run configuration.
After that, I could set breakpoints on my Python code and inspect local variables when the breakpoints were hit. Nice integration of Python within Eclipse!
I just miss the vertical lines that show the indentation levels. It seems PyDev lacks this feature…
Also, google appengine – instructions for pydev on eclipse mentions about ‘arguments’ port=9999, – this doesn’t work if you do not have it right format, which is “–port=9999″
Comment by pv — August 19, 2008 @ 7:48 pm
The above posting shows ‘- -’ as ‘-’ . so it is ‘- – port=nnnn” . no space between ‘-’s.
Comment by pv — August 19, 2008 @ 7:57 pm
Thanks! I think that is shown in this image: http://code.google.com/appengine/articles/eclipse_img/pargs.png
Comment by fernandoacorreia — August 19, 2008 @ 8:04 pm
Variable references empty selection: ${project_loc}.
when it occured,you can
1.select your project
2.F5 refresh
3.then debug it again
Comment by reedfly — October 16, 2008 @ 8:34 pm
It didn’t like when I tried to set a port. But now that I look at post 2, I think I know why. There’s two hyphens! But I’m ok with default port. That’s really tricky having to select your src folder for it to work. Ouch! I was almost ready to give up.
It’d be nice of google to update their instruction page here:
http://code.google.com/appengine/articles/eclipse.html
titled “Configuring Eclipse on Windows to Use With Google App Engine”
To incorporate all of these issues, and how the latest eclipse version has different things to click. I sort of stumbled through the setup, finding things that seemed right even though they weren’t named how google said they would be. But it’s working!
Comment by That Guy — June 3, 2009 @ 1:57 pm
Hi there, I discovered your blog by using Google while looking for details as well
as your post looks so interesting to me. Wonderful Job, Chow!
Comment by local google search — April 10, 2013 @ 1:46 am