App Engine
Google App Engine is a service and a platform where you can develop and host web applications. You can learn more about Google App Engine at the official Google App Engine site.
With App Engine integration, you can run and debug Google App Engine applications. A new project already includes app.yaml with default configuration settings, and the GO file with the Hello World application. Customize the basic handler in the GO file or write your own.
The App Engine project has a predefined run/debug configuration. To add another configuration, select Go build in the Run/Debug configurations dialog. For more information about run/debug configurations, see Run/debug configurations.
Create a project with App Engine integration
Select
.In the New Project page, select App Engine.
In the GOROOT field, specify the location of your Go installation. Usually, the location is defined automatically.
To change or install a new version of Go SDK, click the Add SDK button and select Local to choose the Go SDK version on your hard drive, or select Download to download Go SDK from the official repository. For more information about installing Go SDK, see Installing Go SDK.
(Optional) Toggle the Index entire GOPATH checkbox:
Checkbox cleared: project files and vendored packages are indexed. Packages from GOPATH are not indexed. Might improve the overall performance.
Checkbox selected: packages from GOPATH and project files are indexed.
Click Next, specify a project name and click Finish.
Create an App Engine with the Go 1.9 runtime and lower
Download and unpack Google Cloud SDK for App Engine (Download the Cloud SDK ). For the 1.9 runtime version, scroll to section.
Select
.In the New Project page, select App Engine.
Click the Add SDK icon () near the GOROOT field and select Local.
In the file browser, navigate to the goroot-1.9 folder of Google Cloud SDK for App Engine that is on your hard drive.
Click OK.
Working with App Engine applications
As you created an App Engine project, you can start debugging. The App Engine project has a predefined run/debug configuration and the default address (http://localhost:8080
).
Run an App Engine application
Click the Run button () or press Shift+F10.
The Run button triggers the default run/debug configuration for the Directory run type. For more information about run/debug configurations, see Go run/debug configurations.
In the App Engine tab, click the admin server address.
In the browser, click the instance name (for example, default ).
Debug an App Engine application
Set a breakpoint in the application.
Click the Debug icon Shift+F9
In the App Engine tab, click the server address.
In the browser, click the instance name (for example, default ).
In the Debugger tab, see a list of frames that you can inspect. You can click the frame to see the current state of variables.
Installing Go SDK
Select a local copy of the Go SDK
Ensure that the provided path to the folder with Go SDK includes bin and src folders.
In the New Project dialog, select App Engine.
Click the Add SDK button and select Local.
In the file browser, navigate to the SDK version that is on your hard drive.
Click Open.
Download the Go SDK
In the New Project dialog, select App Engine.
Click the Add SDK button select Download.
From the Version list, select the SDK version.
In the Location field, specify the path for the SDK. To use a file browser, click the Browse icon .
Click OK.