This section describes how to view logs for the Go language server.

Finding the gopath

This section describes how to find where the GOPATH variable points to.

Procedure
  • Execute the Go: Current GOPATH command.

    finding the gopath
    viewing gopath

Viewing the Debug Console log for Go

This section describes how to view the log output from the Go debugger.

Procedure
  1. Set the showLog attribute to true in the debug configuration.

    {
      "version": "0.2.0",
      "configurations": [
         {
            "type": "go",
            "showLog": true
           ....
         }
      ]
    }
  2. To enable debugging output for a component, add the package to the comma-separated list value of the logOutput attribute:

    {
      "version": "0.2.0",
      "configurations": [
         {
            "type": "go",
            "showLog": true,
            "logOutput": "debugger,rpc,gdbwire,lldbout,debuglineerr"
           ....
         }
      ]
    }
  3. The debug console prints the additional information in the debug console.

    viewing debug console log for go

Viewing the Go logs output in the Output panel

This section describes how to view the Go logs output in the Output panel.

Procedure
  1. Navigate to the Output view.

  2. Select Go in the drop-down list.

    viewing go logs output in the output panel