Fernando Correia’s Weblog

August 8, 2008

Debugging Google App Engine applications

Filed under: Software Development — Fernando Correia @ 8:08 pm
Tags:

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…

Advertisements

13 Comments »

  1. 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

  2. The above posting shows ‘- -‘ as ‘-‘ . so it is ‘- – port=nnnn” . no space between ‘-‘s.

    Comment by pv — August 19, 2008 @ 7:57 pm

  3. 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

  4. 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

  5. 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

  6. 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

  7. Please, can you PM me and also explain to me several more things concerning this topic, since I’m already a follower of your blog. It’s So much
    appreciated!

    Comment by Willard — July 14, 2013 @ 7:56 pm

  8. You’ve some great ideas! Maybe I ought to consider trying this myself. This has been very much appreciated information!.

    Comment by rv solar charger — July 15, 2013 @ 7:49 am

  9. Hey, Thank you for the nice writeup. It in fact was a nice easy read.
    I will come back to enjoy more of your excellent work.
    By the way, how could we communicate? Thanks a lot!

    Comment by solar laptop charger — July 15, 2013 @ 12:23 pm

  10. I’m not that much of a internet reader to be honest but
    your blogs really nice, keep it up! I’ll go ahead and bookmark your site to come back later. All the best.

    Comment by portable solar usb charger — July 15, 2013 @ 6:11 pm

  11. Hi, I really enjoyed your comments above. Keep up the great work !
    Much appreciated!

    Comment by Vilma — July 28, 2013 @ 12:39 pm

  12. Hello, This is a Great post. I was checking this blog continuously and I’m impressed! Very useful information especially the last part) I appreciate such information a lot. I was looking for this particular info for a very long time. Thank you and good luck to you. Appreciate it!

    Comment by solar powered iphone charger — July 31, 2013 @ 2:59 am

  13. This is seriously decent. I’ve got to say
    that, If your website was obviously a person; I may say Your current
    eyebrows truly make your extremely eyes jump out…

    Thanks as well as keep up the great job!

    Comment by Sheree — August 5, 2014 @ 4:44 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: