TopGit
GitHub Repo Review

Go for VS Code: gopls, Debugging, Diagnostics

golang/vscode-go
GTopGit review image for golang/vscode-go
Review by Topgit.dev for golang/vscode-go, with GitHub repository stats and README context.
Quick verdict

The Go for Visual Studio Code extension is the official Go tooling integration for VS Code, kept up by the engineering team behind Go's own toolchain, not a community fork. Reach for it if you live in VS Code and want gopls-driven completion, build/vet diagnostics, and Delve debugging wired together out of the box. Skip it if you need an editor VS Code doesn't cover.

Stars
โ˜… 4.3k
Forks
โ‘‚ 922
Contributors
๐Ÿ‘ฅ 351
Language
TypeScript
License
See repository
Topic
Developer Tools
Updated
Aug 2026

What is the Go for VS Code Extension?

The Go for Visual Studio Code extension adds Go language support to VS Code: gopls-backed completion, symbol lookup, formatting, inline build/vet/lint diagnostics, and integrated testing and debugging. It hands language analysis to gopls and step-through debugging to Delve rather than reimplementing that logic itself. It activates automatically the first time you open a .go or go.mod file.

Who is the Go for VS Code Extension for?

The Go for VS Code extension fits developers who already write Go and want VS Code to behave like a Go-aware editor rather than a plain text editor with color-coding. It suits people new to Go as much as experienced Go developers who want gopls-backed completion and Delve debugging without switching to a dedicated Go IDE. It's a poor fit if you don't use VS Code at all, since the status bar, Command Palette commands, and settings it adds are specific to that editor.

How to Install and Get Started

Install Go 1.21 or newer first, then install the Go for VS Code extension (published as golang.go) from the Visual Studio Code Marketplace. Opening any .go file or a go.mod file activates it automatically โ€” there's no separate 'enable' step. A status-bar entry in VS Code's bottom-right corner names your active Go version, and a lightning-bolt icon next to it means gopls is running. Under the hood, it relies on `go`, `gopls`, plus a handful of optional tools; if `gopls` isn't installed yet, the extension offers to install it for you. Want early access to fixes before they reach stable? The pre-release channel uses odd minor-version numbers (0.ODD.patch) against even numbers (0.EVEN.patch) for stable, and you switch to it from the extension's dropdown on VS Code's extension management page.

Core Features for Go Development

  • โœ“Code completion driven by gopls, shown inline as you type rather than relying on static syntax matching.
  • โœ“Symbol navigation that jumps straight to, or previews, where something is declared without leaving the current file.
  • โœ“Editing conveniences: saved snippets, formatting on save, and Go imports reorganized for you automatically.
  • โœ“Inline diagnostics from `go build`, `go vet`, and lint checks, flagged as you type or when you save.
  • โœ“A test runner wired directly into VS Code's own testing UI.
  • โœ“Delve-backed debugging with breakpoints, stepping, and variable inspection inside the editor.
  • โœ“A full command set reachable from the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`), from formatting to installing tools.
  • โœ“A status-bar entry naming your active Go version, with a lightning-bolt icon once gopls is confirmed active.
How this repository's GitHub stars have grown over time. Source: star-history.com.View the star history โ†—

Configuring Your Go Workspace

The extension works in both classic GOPATH mode and Go modules mode, and current development is better served by modules, which have been the default build mode since Go 1.16. A module is just a directory tree with a go.mod file at its root, and unlike GOPATH mode it doesn't need to sit in any particular location on disk. If your workspace spans multiple modules or an uncommon layout, add each module root as a separate Workspace Folder so gopls can see them individually. For sharper color-coding than VS Code's built-in TextMate grammar gives you, turn on gopls' semantic highlighting by setting `"gopls": { "ui.semanticTokens": true }` in your settings. Most day-to-day actions, including running `Go: Install/Update Tools`, are reachable from the Command Palette rather than a menu.

Strengths

  • โœ“Maintained directly by engineers on Go's own tools team rather than a third-party plugin author.
  • โœ“Missing tools get installed for you: if `gopls` isn't present, the extension offers to install it instead of leaving you to run `go install` yourself.
  • โœ“Completion, navigation, diagnostics, testing, and debugging are unified in one extension instead of several separate plugins.
  • โœ“Go Telemetry uploads are opt-in, not opt-out โ€” nothing goes to telemetry.go.dev unless you explicitly turn it on.
  • โœ“Works with both GOPATH and Go modules, so older codebases aren't locked out of tooling that modules-based projects get.

Version Support and Known Considerations

  • โ–ณSupport only covers the current stable release and its matching pre-release build; once a new version ships, older installs are on their own.
  • โ–ณOfficial Go-version support tops out at the two newest major releases, with best-effort coverage reaching back across the three before that โ€” an older pinned Go toolchain needs the separate Compatibility page and manual tool versions.
  • โ–ณgopls and dlv are verified only against their own newest releases, so an older gopls paired with a new extension build isn't a combination the team tests.
  • โ–ณDefault Go syntax coloring comes from a TextMate rule built into VS Code itself, not from this extension โ€” sharper semantic highlighting has to be turned on by hand via a gopls setting.
  • โ–ณBeyond the Quick Start steps, the extension's own documentation for day-to-day usage lives in a separate wiki rather than the README, so some settings and workflows aren't covered here.

Other Go Development Environments

GoLand โ€” JetBrains' dedicated, paid Go IDE, with deeper refactoring tooling than an editor extension can offer.vim-go โ€” a Vim plugin that wires gopls and Delve into Vim and Neovim for developers who work from the terminal.Neovim with nvim-lspconfig โ€” Neovim's built-in LSP client talking to gopls directly, without an editor extension layer around it.LiteIDE โ€” a lightweight, Go-specific IDE that predates modern language-server tooling.

Frequently Asked Questions

What are the requirements for the Go for VS Code extension?

The Go for VS Code extension needs VS Code 1.90 or newer, or any editor whose APIs match VS Code 1.90 and above, plus Go 1.21 or newer, per the README's Requirements section.

Does the Go for VS Code extension support Go modules?

The Go for VS Code extension supports both Go modules and the older GOPATH mode, and the README recommends developing in module mode for current projects.

Is telemetry enabled by default in the Go for VS Code extension?

By default, the Go for VS Code extension keeps Go Telemetry uploads turned off; you opt in by running the gotelemetry CLI's `on` command, after which gopls sends performance and stability data to telemetry.go.dev.

What Go versions are officially supported by the extension?

Following the Go Release Policy, official support from the Go for VS Code extension covers the newest two major Go releases, and the Go team extends best-effort support across the three most recent major versions.

What is `gopls` and why is it needed?

`gopls` is the official Go language server. The Go for VS Code extension hands completion, navigation, diagnostics, and formatting off to `gopls` instead of implementing that analysis itself, installing it automatically if it's missing.

What is the license for the Go for VS Code extension?

The Go for VS Code extension is released under the MIT license, per the LICENSE file linked from its README.

The problem it solves

Go's own toolchain ships as separate command-line programs โ€” gofmt, go vet, go build, go test, dlv โ€” so without an integration layer, a Go developer working in a general-purpose text editor has to run each one by hand and cross-reference file:line output manually. The Go for VS Code extension's specific fix is wiring gopls and dlv into VS Code's own diagnostics, completion, and debug-adapter APIs, so build/vet/lint errors, symbol lookups, and breakpoints show up inline instead of living in a separate terminal pane.

Best use cases

  • โ€ขDebugging a Go service with breakpoints and variable inspection through VS Code's debug UI instead of driving Delve from a separate terminal.
  • โ€ขWorking across several Go modules in one workspace by adding each module root as a Workspace Folder.
  • โ€ขCatching build, vet, and lint errors inline while typing, instead of switching to a terminal to run `go vet` by hand.
  • โ€ขTrying pre-release fixes and features ahead of stable by switching to the odd-minor-version pre-release channel.
  • โ€ขKeeping gopls, `dlv`, and other supporting tools current by running `Go: Install/Update Tools` instead of managing them manually.

Related repositories

Source & attribution

Facts and quotes sourced from the golang/vscode-go GitHub repository and its README.

GitHub data ยท last synced Aug 12, 2026Reviewed by Henry
โ† Back to TopGit

Curious whether vscode-go is right for you?

Let ChatGPT, Claude, or Perplexity look into it โ€” click below and see what AI actually says about vscode-go.

GitHub