Develop and Debug Google App Engine Applications inside Visual Studio

By Dario Iacampo

When you install google app engine sdk on windows, you get the Google App Engine Launcher, that allows you to create new applications, start and test them locally, access log files and deploy the application.
I just created a project template for visual studio, it uses the same project template that gae laucher uses to create new projects.



By this template you can easily create new applications, you only need to understand a couple of things and manually add a line of settings to your project.

The test web server that gae uses to run applications is dev_appserver.py, so Visual Studio should use this as startup file, an pass the port where you wish your application to run and your application path as arguments.



As I pointed out in the comments in the app main file, you should remember to update this parameters.


#REMEMBER!!
#1- SET CORRECT APPLICATION PORT AND PATH:
#   RIGHT CLICK SOLUTION/PROPERTIES/DEBUG 
#   SCRIPT ARGUMENT: --port=8118 J:\Your\Application\Path
#2- IGNORE ZipImportError EXCEPTION:
#   CTRL+ALT+E / ADD/PYTHON EXCEPTIONS: google.appengine.dist.py_zipimport.ZipImportError
#   UNCHECK User-unhandled







Now you can run and debug the application as usual in Visual Studio.
The first time you run the application you get some google.appengine.dist.py_zipimport.ZipImportError that you can ignore, you can easily stop Visual Studio throwing those exception through launching the exception manager by CTRL+ALT+E, adding this particular python exception  and unchecking  User-unhandled.




DOWNLOAD TEMPLATE

You need: