Go for Visual Studio Code
Remote attach debugging is now available via Delve's native DAP implementation with Delve v1.7.3 or newer.
We plan to enable this as the default in early 2022 to enhance remote debugging with the same
debugging features that are already in use for local debugging.
We recommend switching your remote attach configurations in
You are ready to Go :-) 🎉🎉🎉
If you are new to Go, this article provides
the overview on Go code organization and basic
This extension provides many features, including IntelliSense, code navigation, and code editing support. It also shows diagnostics as you work and provides enhanced support for testing and debugging your programs. See the full feature breakdown for more details and to learn how to tune its behavior.
In addition to integrated editing features, the extension provides several
commands for working with Go files. You can access any of these by opening the
Command Palette (
⚠️ Note: the default syntax highlighting for Go files is provided by a TextMate rule embedded in VS Code, not by this extension.
The extension uses a few command-line tools developed by the Go community. In
In order to locate these command-line tools, the extension searches
Setting up your workspace
Go modules are how Go manages dependencies in
recent versions of Go. Modules replace the
Unlike the traditional
Your project may involve one or more modules. If you are working with multiple modules or uncommon project layouts, you will need to configure your workspace by using Workspace Folders. Please see this documentation about supported workspace layouts.
The extension needs no configuration and should work out of the box. However, you may wish to adjust settings to customize its behavior. Please see the settings documentation for a comprehensive list of settings. See advanced topics for further customizations and unique use cases.
If the extension isn't working as you expect, you can take a look at our troubleshooting guides. There is one for general troubleshooting, and another specifically for troubleshooting the debugging feature.
Ask for help
If you'd like to get early access to new features and bug fixes, you can use the nightly build of this extension. Learn how to install it in by reading the Go Nightly documentation.
We welcome your contributions and thank you for working to improve the Go development experience in VS Code. If you would like to help work on the VS Code Go extension, please see our contribution guide. It explains how to build and run the extension locally, and describes the process of sending a contribution.
Code of Conduct
This project follows the Go Community Code of Conduct. If you encounter a conduct-related issue, please mail firstname.lastname@example.org.