I just tested this and it works:

1. Create a New Project in Eclipse.  Call it Test-Server.  Put the two files
listed below in Test-server/src
2. Create a Run/Debug configuration in Eclipse. Name it "Test-Server".
3. In the Main Tab of the above configuration panel, set your Main Module to
something like this:
    ${workspace_loc:test-server/google_appengine/dev_appserver.py}

where "test-server" is the project directory.  Note that I have the
appengine code in the same workspace directory, YMMV

4. Under the Arguments tab, put the following in the Arguments text area:
     ${project_loc}/src
     --port=9999

5. Save the configuration.

6.  Open up test-server.py in an editor.  Put a breakpoint on the line
            self.response.out.write("This is the Main Page.")

by double-clicking in the leftmost margin.

7. Select "Debug As..." from the menu.  Select "Test-server".

8. Fire up a browser and go to http://localhost:9999

9. Switch back to Eclipse and you should be in the Debug Perspective with
the breakpointed line highlighted.

File 1: app.yaml
application: test-server
version: 1
runtime: python
api_version: 1

handlers:
- url: /.*
  script: test_server.py

File 2: test-server
import os
import sys
import cgi
import string

from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app



class MainPage(webapp.RequestHandler):
  def get(self):
    self.response.out.write("This is the Main Page.")


application = webapp.WSGIApplication(
                                     [('/'      ,
MainPage),
                                     ],
                                     debug=True)

def main():
  run_wsgi_app(application)

if __name__ == "__main__":
  main()
========================= EOF=====================




-- 

Faber Fedor
Cloud Computing New Jersey
http://cloudcomputingnj.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to