GoLand 2020.1 Help

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 Work with run/debug configurations.

Create a project with App Engine integration

  1. Select File | New | Project.

  2. In the New Project page, select App Engine.

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

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

  5. Click Create.

    Create a project with App Engine integration

Create an App Engine with the Go 1.9 runtime and lower

  1. Download and unpack Google Cloud SDK for App Engine (Download the Cloud SDK). For the 1.9 runtime version, scroll to Previous App Engine SDK section.

  2. Select File | New | Project.

  3. In the New Project page, select App Engine.

  4. Click the Add SDK icon (the Add SDK icon) near the GOROOT field and select Local.

  5. In the file browser, navigate to the goroot-1.9 folder of Google Cloud SDK for App Engine that is on your hard drive.

  6. Click OK.

    Create an App Engine with the Go 1.9 runtime

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

  1. Click the Run icon Shift+F10

  2. In the App Engine tab, click the admin server address.

  3. In the browser, click the instance name (for example, default).

Debug an App Engine application

  1. Set a breakpoint in the application.

  2. Click the Debug icon Shift+F9

  3. In the App Engine tab, click the server address.

  4. In the browser, click the instance name (for example, default).

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

  1. In the New Project dialog, select App Engine.

  2. Click the Add SDK button and select Local.

  3. In the file browser, navigate to the SDK version that is on your hard drive.

  4. Click Open.

    Select a local copy of Go SDK

Download the Go SDK

  1. In the New Project dialog, select App Engine.

  2. Click the Add SDK button select Download.

  3. From the Version list, select the SDK version.

  4. In the Location field, specify the path for the SDK. To use a file browser, click the Browse icon the Browse icon.

  5. Click OK.

    Download the Go SDK
Last modified: 4 June 2020