JetBrains Fleet 1.22 Help

Run Go code

You can run your Go code right from Fleet provided that you have configured a SDK.

Quick way

If you are not going to pass any parameters to your program, and your program does not require any specific actions to be performed before start, you can run it right from the editor.

  1. Click the run icon in the gutter near the class or main method declaration and select Run.

    A menu appears on clicking run icons in the gutter
  2. Alternatively, place the caret at the class or main method that you want to run, and press Command Shift R

Customizable way

If you are going to pass parameters to your program or otherwise customize the startup of your program, use a run/debug configuration.

Run configuration is a set of parameters that define how exactly your program or task has to run. It contains the entire context that is required for launch, including commands, paths to executables, environment variables, arguments, and so on.

Creating run configurations

  1. Click the Run icon (Command R) and select Create Run Configurations in run.json.

  2. In the run.json file, define running or debugging parameters. If the file is empty, press Alt ↵ or click the file template link.

    Alternatively, paste and edit the following code:

    { "configurations": [ { "type": "go", "name": "myApp", "goExecPath": "/usr/local/go/bin/go", "buildParams": [ "$PROJECT_DIR$/main.go" ] } ] }

    Modify the configuration properties according to your environment.

    To learn about Go run configurations in JetBrains Fleet, refer to Go run configurations.

  3. Press Command R or select Run | Run & Debug from the main menu. Select the configuration that you are going to run or debug.

Manage running applications and tasks

Stop a task

  • Click the Stop button in the tab of the running task.

    The Stop icon in the top-right corner of a tab

View running tasks

  • Click Command R. Run & Debug popup opens and lists the tasks. The tasks that are currently running are indicated with a green circle.

    Running tasks displayed in the Run and Debug popup
Last modified: 01 September 2023