We welcome your contributions and thank you for working to improve the Go development experience in VS Code.
This guide will explain the process of setting up your development environment to work on the VS Code Go extension, as well as the process of sending out your change for review. If you're interested in testing the master branch or pre-releases of the extension, please see the Go Nightly documentation.
If you are interested in fixing a bug or contributing a feature, please file an issue first. Wait for a project maintainer to respond before you spend time coding.
If you wish to work on an existing issue, please add a comment saying so, as someone may already be working on it. A project maintainer may respond with advice on how to get started. If you're not sure which issues are available, search from issues with the help wanted label.
The VS Code Go maintainers are reachable via the issue tracker and the #vscode-dev channel on the Gophers Slack. Please reach out on Slack with questions, suggestions, or ideas. If you have trouble getting started on an issue, we'd be happy to give pointers and advice.
Clone the repository, run
npm install and open VS Code:
git clone https://github.com/golang/vscode-go cd vscode-go npm install code .
Make sure the
window.ope nFoldersInNewWindow setting is not
To run the extension with your patch, open the Run view (
Launch Extension, and click the Play button (
This will open a new VS Code window with the title
[Extension Development Host]. You can then open a folder that contains Go code and try out your changes.
You can also set breakpoints, which will work as you run the extension.
If you make further edits in the codebase, you can reload (
[Extension Development Host] instance of VS Code, which will load the new code. The debugging instance will automatically reattach.
To debug the Go debugger, see the debugAdapter README.
There are currently three test launch configurations: (1) Launch Extension Tests, (2) Launch Extension Tests with Gopls, and (3) Launch Unit Tests. To run the tests locally, open the Run view (
Ctrl+Shift+D), select the relevant launch configuration, and hit the Play button (
After making changes to the extension, you may want to test it end-to-end instead of running it in debug mode. To do this, you can sideload the extension.
Install the vsce tool for packaging extensions (
npm install -g vsce).
cd into your
Install all dependencies by running
vsce package to build the package. This will generate a file with a
.vsix extension in your current directory.
npm install -g vsce cd vscode-go npm install vsce package
Open a VS Code window, navigate to the Extensions view, and disable or uninstall the default Go extension.
Click on the “...” in the top-right corner, select “Install from VSIX...”, and choose the generated VSIX file. Alternatively, you can run
code --install-extension path/to/go.vsix or open the Command Palette and run the “Extensions: Install from VSIX...” command.
In either case, code review will happen in Gerrit, which is used for all repositories in the Go project. GitHub pull requests will be mirrored into Gerrit, so you can follow a more traditional GitHub workflow, but you will still have to look at Gerrit to read comments.
The easiest way to start is by reading this detailed guide for contributing to the Go project. Important things to note are:
Once you‘ve sent out your change, a maintainer will take a look at your contribution within a few weeks. If you don’t hear back in that time, feel free to ping the issue or send a message to the #vscode-dev channel of the Gophers Slack.