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, refer to Run/debug configurations.
Create a project with App Engine integration
Select
.Alternatively, click New Project in the Welcome to GoLand dialog.
In the New Project dialog, select App Engine from the list of available projects.
In the GOROOT field, specify the location of your Go installation. GoLand typically detects this location automatically.
To change or install a new version of the Go SDK, click Add SDK () and select one of the following options:
Local: to select a Go SDK version on your local drive.
Download: to download the Go SDK from the official repository.
(Optional) Toggle the Index entire GOPATH checkbox:
When cleared, project files and vendored packages are indexed. Packages from GOPATH are not indexed. Might improve the overall performance.
When selected, packages from GOPATH and project files are indexed.
Click Create.
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
.Click the Add button () and select Go Build.
From the Run kind list, select Directory. For more information about run/debug configurations, refer to Create a run/debug configuration.
Click OK.
Press Ctrl+Shift+F10. Alternatively, right-click any area of the opened file in the editor and select Run <configuration_name>.
In the Run tool window on the App Engine tab, click the server address.
Debug an App Engine application
Click in the gutter where you want to set a breakpoint. For more information about breakpoints, refer to Breakpoints.
Press Shift+F9. Alternatively, right-click any area of the opened file in the editor and select Debug <configuration_name>.
In the Debug tool window, refer to a list of frames that you can inspect. You can click the frame to view the current state of variables.
Installing Go SDK
Select a local copy of the Go SDK
Press Ctrl+Alt+S to open settings and then select
.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
Press Ctrl+Alt+S to open settings and then select
.Click the AddSDK({0}) button () and 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.