All notable changes to this project will be documented in this file. The format is based on Keep a Changelog.
Date: 2025-09-04
This is the pre-release version of v0.52.
Full Changelog: https://github.com/golang/vscode-go/compare/v0.50.0-rc.1...v0.51.0 Milestone: https://github.com/golang/vscode-go/issues?q=milestone%3Av0.52.0
Date: 2025-09-04
Date: 2025-08-21
This is the pre-release version of v0.50.
Full Changelog: https://github.com/golang/vscode-go/compare/v0.48.0-rc.1...v0.49.1 Milestone: https://github.com/golang/vscode-go/issues?q=milestone%3Av0.50.0
Date: 2025-07-07
This is the pre-release version of v0.50.
Full Changelog: https://github.com/golang/vscode-go/compare/v0.48.0-rc.1...v0.49.0 Milestone: https://github.com/golang/vscode-go/issues?q=milestone%3Av0.50.0
Date: 2025-06-30
Go: Choose Go Environment showing diff between options locally discovered and options available for download.golangci-lint-v2. It's added as an installable tool, so you can install it via the Go: Install/Update Tools command.golangci-lint and golangci-lint-v2 option. You must keep the golangci-lint executable version on your machine to v1 for that.golangci-lint executable updated to v2. Just keep using the golangci-lint option for that.path-mode flag set by vscode-go can be overridden by thego.lintFlags option.Cannot read properties of null (reading 'Token') error during command execution when the command result did not include a token. (Issue 3698)Debug Subtest At Cursor command. (Issue 3718)Date: 2025-06-23
This is the pre-release version of v0.48.
Full Changelog: https://github.com/golang/vscode-go/compare/v0.46.0-rc.1...v0.47.4 Milestone: https://github.com/golang/vscode-go/issues?q=milestone%3Av0.48.0
Date: 2025-06-05
This is the pre-release version of v0.48.
Full Changelog: https://github.com/golang/vscode-go/compare/v0.46.0-rc.1...v0.47.3 Milestone: https://github.com/golang/vscode-go/issues?q=milestone%3Av0.48.0
Date: 2025-04-15
This is the pre-release version of v0.48.
Full Changelog: https://github.com/golang/vscode-go/compare/v0.46.0-rc.1...v0.47.2 Milestone: https://github.com/golang/vscode-go/issues?q=milestone%3Av0.48.0
Date: 2025-03-04
Full Changelog: https://github.com/golang/vscode-go/compare/v0.46.0...v0.46.1 Milestone: https://github.com/golang/vscode-go/issues?q=milestone%3Av0.46.1
Date: 2025-03-04
This is the pre-release version of v0.48.
Full Changelog: https://github.com/golang/vscode-go/compare/v0.46.0-rc.1...v0.47.1 Milestone: https://github.com/golang/vscode-go/issues?q=milestone%3Av0.48.0
Date: 2025-02-27
This is the pre-release version of v0.48.
Full Changelog: https://github.com/golang/vscode-go/compare/v0.46.0-rc.1...v0.47.0 Milestone: https://github.com/golang/vscode-go/issues?q=milestone%3Av0.48.0
Date: 2025-02-27
Kokoro to LUCI. The presubmit tests will be triggered against multiple go versions.Date: 2025-02-19
This is the pre-release version of v0.46.
Full Changelog: https://github.com/golang/vscode-go/compare/v0.44.0-rc.1...v0.45.2 Milestone: https://github.com/golang/vscode-go/issues?q=milestone%3Av0.46.0
Date: 2025-02-11
This is the pre-release version of v0.46.
Full Changelog: https://github.com/golang/vscode-go/compare/v0.44.0-rc.1...v0.45.1 Milestone: https://github.com/golang/vscode-go/issues?q=milestone%3Av0.46.0
Date: 2024-12-16
This is the pre-release version of v0.46.
Full Changelog: https://github.com/golang/vscode-go/compare/v0.44.0-rc.1...v0.45.0 Milestone: https://github.com/golang/vscode-go/issues?q=milestone%3Av0.46.0
Date: 2024-12-16
debug.internalConsoleOption is neverOpen. (CL 627675)"go.toolsManagement.go" setting to use the go1.21 or newer when installing tools. (Issue 3411)es2022. (Issue 3540)A new extension, Go Companion, has been released with experimental support for gopls-based test discovery. If Go Companion is installed, pre-release versions of this extension will automatically disable its test explorer in favor of Go Companion‘s implementation. See experiments for details on Go Companion’s features and for disabling the automatic switchover.
Date: 2024-12-05
This is the pre-release version of v0.44.
Full Changelog: https://github.com/golang/vscode-go/compare/v0.42.0-rc.1...v0.43.4 Milestone: https://github.com/golang/vscode-go/issues?q=milestone%3Av0.44.0
Date: 2024-11-18
This is the pre-release version of v0.44.
Full Changelog: https://github.com/golang/vscode-go/compare/v0.42.0-rc.1...v0.43.3 Milestone: https://github.com/golang/vscode-go/issues?q=milestone%3Av0.44.0
Date: 9 Sep, 2024
A comprehensive list of changes can be found in the complete commit history.
gomodifytags, impl, gofumpt, and revive. (CL 607757).Date: 22 Aug, 2024
This is the pre-release version of v0.44. The nightly (golang.go-nightly) extension will be deprecated in favor of the pre-release version.
Date: 17 Jul, 2024
A comprehensive list of changes can be found in the complete commit history.
goplsThis extension continues to use Go toolchain telemetry. By default, telemetry data is kept only on the local computer, but you can opt in to share it with the Go team with one of the following ways:
go run golang.org/x/telemetry/cmd/gotelemetry@latest on in the terminal, orgo telemetry on, from go1.23, orOnce uploading is enabled, the data will be sent to https://telemetry.go.dev approximately once a week.
For tools installation managed by the extension, this version requires go1.19 or newer version. The next minor release (v0.43.0+) will require go1.21 or newer to install tools. If your project requires go1.20 or older to build, you will need to manually install compatible versions of tools, or configure the "go.toolsManagement.go" setting to use go1.21+ when installing the tools.
The extension installs its required tools using the go install command. Starting go1.21, the go command allows tool authors to specify the minimum Go version required to build their tools. If the required go toolchain version is not locally available, the go command needs to download it like other dependencies of the tool. To ensure this toolchain switch works correctly, the extension enforces GOTOOLCHAIN=auto mode during tools installation. Note that this change does not affect how it builds and tests your own project. For more information about Go's toolchain switch behavior, see the official documentation.
"${workspaceFolder}${1:}" instead of "${fileDirname}" as the default "program" attribute value. If the package to debug is located in the subdirectory, adjust the configuration to point to the main package path. The official VS Code Variables Reference lists useful substitution rules you can use in adjusting your launch.json setting.Thanks for your contributions, @yimiaoxiehou!
Date: 24 Apr, 2024
This point release addresses a regression issue (spurious display of the Go welcome page) within cloud-based IDEs.
See the full commit history for detailed changes.
Date: 22 Apr, 2024
This point release temporarily reverts the default remote debugging behavior to use the legacy debug adapter due to existing feature gaps. Once these gaps are addressed as outlined in Issue 3096, we plan to switch the default back to use Delve DAP for remote deubgging.
If you want to continue using Delve DAP for remote debugging, use the following settings in your launch.json.
{ "name": "Debug Remote", "type": "go", "request": "attach", "mode": "remote", "debugAdapter": "dlv-dap", // Use Delve DAP ... }
See the full commit history for detailed changes.
go.alternateTools setting's customFormatter entry (Issue 2582).go.showWelcome setting (Issue 3319).Thanks for your contributions, @uniquefine, @monitor1379, @suzmue, @hyangah!
Date: 14 Mar, 2024
This release is a point release to increase the prompt rate of Go telemetry opt-in. Learn more at https://go.dev/doc/telemetry. For a detailed list of changes, refer to the complete commit history.
Thanks for your contributions! @Cr4zySheep, @nirhaas
Date: 22 Feb, 2024
This release is a point release to skip vscgo installation on Windows (Issue 3182). For a detailed list of changes, refer to the complete commit history.
Date: 14 Feb, 2024
This release introduces significant updates to the extension's UI. We also want to share the news that the gopls v0.15 release enhances the multi-module workspace experience and improves build tag handling.
For a detailed list of changes, refer to the complete commit history.
gopls can automatically determines workspace configurations such as Go module boundaries and necessary GOOS/GOARCH build tags for open Go files. This eliminates the need for users to align the VS Code workspace root folders with the Go module root folder."Developer: Set Log Level..." command to adjust the logging level. The go.logging.level setting is deprecated in favor of this new logging mechanism."Go: Locate Configured Go Tools" command now opens an untitled file and dumps the tools information there, instead of printing it in the “Go” output channel. This change allows users to inspect and edit the output easily before sharing it in their issue report."Go: Install/Update Tools" command.gopls and an optionally selected extra lint tool such as staticcheck or golangci-lint) if they are missing, using go install commands. Any installation failures will be surfaced in the language status bar and the “Go” output channel.dlv installation until the debug feature is invoked.vscgo, an optional tool used to update the Go telemetry counters. This tool is installed in the extension's directory.web-request has been replaced with node-fetch@v2. (Issue 2995)extension/ directory. See Issue 3122 for more details.Date: 22 Jan, 2024
This is a point release to update the upcoming developer survey information (the commit history).
Date: 21 Dec, 2023
This is a point release to fix minor bugs. A comprehensive list of bug fixes and changes can be found in the milestone and the commit history.
GOTOOLCHAIN environment variable is shown from the Go explorer view.go installed by snap, it will use /snap/go/current/bin/go as the go command path to work around a bug in snapd. (Issue 166).editor.parameterHints.enabled and shows parameter hints after completion only if it is enabled. (Issue 3071)npm audit fix and that updated semver and word-wrap dependencies. (CL 551055).Thank you for your contribution @tekig, @rogeryk, @hyangah!
Date: 15 Nov, 2023
This extension uses Go Telemetry to gather insights about the performance and stability of the extension and the language server it employs. By default, Telemetry uploading is disabled, but starting from this version, a small number of users will be prompted to enable it. Users can enable uploading of telemetry data by either responding to the prompt or running the following command:
go run golang.org/x/telemetry/cmd/gotelemetry@latest on
Once uploading is enabled, the data will be sent to https://telemetry.go.dev each week. You can find more information about this process at https://telemetry.go.dev/privacy and in the gopls v0.14 release notes.
A comprehensive list of changes can be found in the complete commit history.
In this release, we have removed legacy language feature providers that were supported by outdated tools. As a result, features such as code completion, navigation, documentation, diagnostics, and refactoring will only function when the language server (gopls) is enabled. (Issue 2799)
The “Go: Fill struct” command has been retired. The same functionality is provided as a Code Action for refactoring. You can refer to the screenshot for details. (Issue 2107))
The “Go: Extract to function” and “Go: Extract to variable” commands are no longer needed, as they have been replaced by Code Actions provided by gopls. (Issue 2862)
The “buildFlags” attribute for Go launch configuration now accepts a list of strings in addition to a string. If using delve at v1.22.2 or newer, this list is passed directly to delve. This should help with bugs related to parsing the string of buildFlags, such as in Issue 1831 and Issue 1027. (Issue 3009)
The “Go: Toggle Hide System Goroutines” command was added to make it easier to switch between showing / hiding the system goroutines in the callstack view. This command is also available in the callstack context menu. The default setting can be updated by updating “hideSystemGoroutines” in either the launch.json or in the “go.delveConfig” setting. (Issue 1797)
${env:VAR} in the go.toolsEnvVars setting (Issue 2680) and the go.goroot setting (Issue 3006) are now correctly substituted. Patterns like ${VAR} inside environment files (go.testEnvFile) can be used to reference other environment variables as well. (Issue 1902)Thank you for your contribution @n1lesh, @suzmue, @hyangah!
Date: 17 Jul, 2023
This is a point release to update the link for the upcoming Go developer survey. A list of changes can be found in the full commit history.
Date: 12 Jun, 2023
We are in the process of removing legacy language features that were replaced by gopls since early 2021. The versions released after September 2023 will no longer offer features like code completion, navigation, documentation, formatting, and refactoring if the language server is disabled. In this release, we are showing deprecation notification messages if you are using the legacy language features. (Issue 2799)
A list of all issues and changes can be found in the v0.39.0 milestone and commit history.
Added the go.showWelcome setting that controls whether to show the Welcome page. (PR 2704)
Report when go.toolsManagement.go setting is invalid and ignored. (Issue 2753)
Removed go.languageServerExperimentalFeatures setting which was deprecated in v0.21.0. (Issue 1109)
Deprecated settings that affect only legacy language features and tools. They will be removed in the release after September 2023. (Issue 2799)
"Go: Update/Install Tools" will install the latest version of golangci-lint instead of a vetted, pinned version. The extension chose to pin the versions of third-party go tools it installs in order to manage version skew and reduce security risks. However, golangci-lint is frequently released and its community is active enough to handle compatibility/security issues. We decided to install the latest version by default. (Issue 2763, 2485)
Debug: show error when the process picker is hidden (CL 499601). To learn more about the process picker in debug, see Launch.json “processId” documentation.
Debug: args attribute now accepts a string typed value. The argument string is parsed into word arguments with rules similar to bash except that there is no shell expansion. This change allows to use vscode variables like ${input:args}. (Issue 2621)
The extension no longer cache PATH environment variable, which helps interoperate with extensions that modify PATH. (Issue 2617)
Updated LSP to v3.17.3 and VS Code language client library to v8.1.0. This includes fixes for request ordering issues around full document sync and bugs around shutdown.
Replaced the extension user survey link to https://go.dev/s/ide-hats-survey. (CL 497536)
Updated settings to sync with gopls@v0.12.
Third-party go tools dependencies: use gofumpt@v0.5.0 and revive@v1.3.2 and install staticcheck@v0.3.3 when building with go1.18 or older.
@vscode/vsce version to address the xml2js prototype pollution vulnerability report -trimpath. (Issue 2609)Date: 23 Feb, 2023
This release adds default go tasks to help build and test your Go projects.
A list of all issues and changes can be found in the v0.38.0 milestone and commit history.
Thank you for your contribution, @ankon, @hyangah, @jamalc, and @suzmue!
Date: 17 Jan, 2023
Thank you for your contribution, @suzmue!
Date: 19 Dec, 2022
This release includes new static analysis features that report known vulnerabilities in your dependencies. These vulncheck analysis tools are backed by Go's vulnerability database and the Go language server‘s integration of govulncheck. Read Go's support for vulnerability management to learn about the Go team’s approach to helping Go developers secure their open-source dependencies.
"go.formatTool" setting accepts a special value "custom", which causes the extension to use the custom formatter configured with the setting "go.alternateTools": { "customFormatter": <your custom tool name> }. (Issue 2503)--check-go-version=false flag using the dlvFlags attribute. (Go Delve Issue 3058)//line-directive. (Issue 2453)Thank you for your contribution, @devuo, @pjweinbgo, @aarzilli, @tklauser, @hyangah, @suzmue, @jamalc!
Date: 7 Nov, 2022 A list of all issues and changes can be found in the v0.36.0 milestone and commit history.
go install command from the terminal instead. (Issue 1850)vars will now offer a completion snippet that expands it to a var (...) block containing multiple variables. (PR 2481)go.enableCodeLens.references, is now hidden. The feature remained broken for a while, so we plan to remove it in a future release. Please see Issue 2509 for details."editor.parameterHints.enabled" setting.Thank you for your contribution, @suzmue, @fatoboist, @cuishuang, @jamalc, @karthikraobr, @pjweinbgo, @firelizzard18, @hyangah!
Date: 15 Aug, 2022 A list of all issues and changes can be found in the v0.35.2 milestone and commit history.
This release includes a new go.goroot command, fixes to the Generate Tests commands, and improvements for windows users.
Thank you for your contribution, @OrBin, @Ras96, @hyangah, @jamalcarvalho, and @suzmue!
Date: 19 July, 2022
A list of all issues and changes can be found in the v0.35.1 milestone and commit history.
Date: 18 July, 2022
A list of all issues and changes can be found in the v0.35.0 milestone and commit history.
Thank you for your contribution, @hyangah, @nirhaas, @bentekkie, @jamalc, and @suzmue.
Date: 30 June, 2022
A list of all issues and changes can be found in the v0.34.1 milestone and commit history.
Thank you for your contribution, @jamalc, @hyangh!
Date: 22 June, 2022
This release adds support for LSP 3.17 and requires Visual Studio Code 1.67+.
This release includes improvements to the Go: Run Vulncheck (Experimental) command (Issue 2185, 2186, 2214). Use it to find security issues in your dependencies.
Documentation for vscode-go can now be found on the wiki (Issue 2094).
Thanks @thediveo for updating the debugging documentation!
TestMain(m *testing.M) is no longer treated as a test (Issue 482, 2039)
Thank you for your contribution, @hyangah, @jamalc, @polinasok, @suzmue, @thediveo, and @dle8!
Date: 24 May, 2022
This is the last release that supports Visual Studio Code 1.66 or older. We plan to add support for LSP 3.17 in the next release and the change requires Visual Studio Code 1.67+.
gopls@v0.8.4. See the release note to learn new features like the //go:embed analyzer, and improved hover for imported packages.Date: 1 May, 2022
📣 Remote attach debugging is now available via Delve's native DAP implementation with Delve v1.7.3 or newer. It is now the default with the Go Nightly and will become the default for the stable releases in mid 2022.
staticcheck: if go 1.16.x or older is used in installing tools, the extension chooses staticcheck@v0.2.2. In order to use the latest version of staticcheck while working on projects that require older versions of go, you can utilize the "go.toolsManagement.go" setting to specify a newer version of go for tool installation. (Issue 2162)
go-outline: go-outline is no longer required when gopls (v0.8.2+) is used.
Activation: the extension defers commands and feature provider registrations until it runs go version and go env, and starts gopls. This change prevent the extension prematually export its features, but may result in a slight increase in extension activation time if those commands run slow.
Survey: we show the gopls opt-out survey prompt only when users change the setting to disable gopls.
Test Explorer: fixed a bug in go.mod file parsing (Issue 2171)
Debugging: we removed the informational popup at the start of remote attach session with dlv-dap. (Issue 2018)
This version includes two highly experimental features. They are still in early stage and we are looking forward to hearing more user feedback.
Go Explorer view: it displays environment variables and information about tools used by the extension. (Issue 2049)
Go: Run Vulncheck (Experimental) command: it runs the govulncheck command embedded in gopls, which identifies known vulnerabilities by call graph traversal and module dependency analysis. (Issue 2096)
@jamalc, @polinasok, @dlipovetsky, @vladdoster, @suzmue, @hyangah
Date: 8 Mar, 2022
This version includes features to enhance Go 1.18 support. It works best when paired with the latest Go Language Server (gopls v0.8.0+) and Delve (dlv v1.8.0+).
Go 1.18 introduces substantial changes to the language spec, so many tools need rebuilding with Go 1.18 or newer. The extension now suggests updates of tools if it finds they were built with old versions of go which are inadequate for the version used for the project. If you opted in for auto-update, tools will be auto-updated.
In order to use Go 1.18, please follow the instruction to configure your Visual Studio Code to locate the right go binary, and run the Go tools using the “Go: Install/Update Tools” command.
A list of all issues and changes can be found in the v0.32.0 milestone and commit history.
Starting with Go 1.18, the go command provides native support for multi-module workspaces, via go.work files. The new “Open ‘go.work’” option in the Go status bar's quickpick menu allows users to access the corresponding go.work file. 
The extension no longer depends on gopkgs. Its use for “Go: Browse Packages” and “Go: Add Import” commands had been replaced with go list or commands in gopls. (Issue 258)
The extension uses gopls instead of go-outline if gopls v0.8.0 or newer is used. We plan to complete the replacement work in the next release. (Issue 1020)
The new "go.toolsManagement.go" setting allows users to specify the Go command for tools installation/updates separate from the Go command used for the project.
The latest gopls requires go 1.13+ for installation, so the extension no longer asks for gopls updates when an older versions of go is used. (Issue 2030) Note gopls compiled with go 1.13 or newer can still process projects that use go 1.12. If you want to update gopls while working with an older version of Go, utilize the new "go.toolsManagement.go" setting.
Reduced the verbosity of “Go: Locate Configured Go Tools” output.
go.dev/dl instead of golang.org/dl for Go release.@jamalc @suzmue @pavlelee @dekimsey @hyangah
Date: 8 Feb, 2022
A list of all issues and changes can be found in the v0.31.1 milestone and commit history.
Date: 26 Jan, 2022
A list of all issues and changes can be found in the v0.31.0 milestone and commit history.
gotmpl (Issue 1957) Thank you for your contribution, @firelizzard18, @hyangah, @jamalc, @polinasok, @TheNagaPraneeth, @suzmue!
Date: 16 Dec, 2021
A list of all issues and changes can be found in the v0.30.0 milestone and commit history.
Debugging
dlv-dap is pinned at @2f136727.dlv-dap is available.dlv-dap. (Issue 1861)showRegisters(Issue 1527). This was added to go.delveConfig, too.hideSystemGoroutines(Issue 1797). This was added to go.delveConfig, too. We plan to hide system goroutines by default in the next release, and it is already enabled in Nightly. Feedback is welcome!backend accepts "rr". Along with "mode": "replay" support that has been available since v0.27.2, this concludes the work for the rewind feature support. (Issue 110). The feature requires Mozilla's rr.dlv command that allows users to dynamically inspect/adjust debug configuration. Please run dlv help from DEBUG CONSOLE to see the list of supported options.mode for attach requests. (Issue 1929)legacy remote debugging. (CL 366936)dlv-dap. (Issue 1814)Enabled Go template file processing. (Issue 609) By default, files with .tmpl and .gotmpl extension are treated as Go template files.
Include Fuzz* functions in Testing UI and adds test codelens. (Issue 1794)
gofumports is pinned at v0.1.1. We plan to remove it from the recognized formatter tool list since gofumports is officially deprecated early next year.
Disabled separate linting if gopls's ‘staticcheck’ is enabled. (Issue 1867)
Updated the in-editor user survey URL. (CL 360775)
Limited Go file search scope for extension activation (Issue 1894)
Code Health
Thank you for your contribution, @polinasok, @suzmue, @firelizzard18, @hashedhyphen, @fengwei2002, @devuo, @fflewddur, @hyangah
Date: 26 Oct, 2021
A list of all issues and changes can be found in the v0.29.0 milestone and commit history.
go.survey.prompt is a new setting to control survey prompts.go install for tools installation when using go1.16+. From go1.18, go get will no longer build/install tools. See the deprecation notice. (Issue 1825) The extension runs go install from the workspace root directory, and the old workaround for Issue 757 is unnecessary.GOPATHs when there are multiple GOPATHs. (Issue 1848) '-' as an acceptable char for interface names. (Issue 1670) showLog/logOutput/dlvFlags to go.delveConfig setting that change the default values for them. (Issue 1723) '.' in its name correctly and warn users for invalid program (Issue 1826, 1769) Thank you for your contribution, @firelizzard18, @Zamiell, @mislav, @polinasok, @hyangah, @stamblerre, @suzmue, and @yinheli!
Date: 24 Sep, 2021
A list of all issues and changes can be found in the v0.28.1 milestone and commit history.
Date: 20 Sep, 2021
This version requires VS Code 1.59 or newer.
🎉🧪 The extension implements the Testing API of VS Code. You can navigate and run/profile tests using the test explorer UI! Windows support and further work for better profiling and debugging support through the test explorer is underway. Please give it a try and provide feedback.
A list of all issues and changes can be found in the v0.28.0 milestone and commit history.
stretchr test suits (Issue 1641) and sub-tests (Issue 1641). You can adjust behavior with the go.testExplorer.* settings.host and port launch properties. (Issue 1729) --check-go-version=false delve flag (Issue 1716). This is to allow users of older versions of Go to debug using Delve DAP which requires Delve 1.6.1 or newer. If you need to use Delve 1.6.0 or older, please use the legacy debug adapter.esbuild instead of webpack (Issue 1705). Thank you for your contribution, Nicolas Lepage, 180909, Polina Sokolova, Rebecca Stambler, and Suzy Mueller! Special thanks to Ethan Reesor for the Test Explorer work!
Date: 1st Sep, 2021
A list of all issues and changes can be found in the v0.27.2 milestone and commit history.
replay and core debug launch modes. (PR 1268)gopls now watches changes in go.work files to support Go Proposal 45713.dlvLoadConfig setting is no longer necessary with the new debug adapter (dlv-dap). ([CL 344370)(https://go-review.googlesource.com/c/vscode-go/+/344370))dlv-dap still fails to start, please check firewall/security settings do not prevent installation or execution of the dlv-dap (or dlv-dap.exe) binary. (Issue 1693)Go: Install/Update Tools command picks the dlv-dap from the main branch.Thanks for your contributions, Suzy Mueller, Luis Gabriel Gomez, Polina Sokolova, Julie Qiu, and Hana Kim!
Date: 12 Aug, 2021
A list of all issues and changes can be found in the v0.27.1 milestone and commit history.
CGO_CFLAGS is set. (Issue 1678)dlv-dap installation issue. (Issue 1682)Thanks for your contributions, Luis Gabriel Gomez, Suzy Mueller, and Hana Kim!
Date: 9 Aug, 2021
📣 Delve's native DAP implementation (dlv-dap) is enabled by default for local debugging. We updated the Documentation for Debugging to show the new features available with dlv-dap. This change does not apply to remote debugging yet. For remote debugging, keep following the instruction in the legacy debug adapter documentation.
A list of all issues and changes can be found in the v0.27.0 milestone and commit history.
go.terminal.activateEnvironment allows to prevent the extension from changing integrated terminal's environment variables. (Issue 1558, 1098) Go: Locate Configured Go Tools command prints the build information of detected tools. dlv-dap as the default debug adapter for local debugging. The new debug adapter offers many new features and improvements.Go: Subtest At Cursor command prompts for subtest name if there is no subtest at cursor (Issue 1602). logOutput property without showLog: true does not break debugging any more. cwd is not set. (Issue 1608) dlv-dap mode ignore the port property. It was initially suggested as a temporary alternative to the remote debugging, but we decided to revisit the functionality for better remote debugging support. Use the debugServer property if you want to connect to a manually launched dlv dap server.dlv-dap is pinned to v1.7.1-0.20210804080032-f95340ae1bf9 and dlv-dap is marked as a required tool.tools/relnotes, a script to help generate CHANGELOG.md. Thank you for your contribution, Ahmed W, Hana, Michael Currin, Polina Sokolova, Rebecca Stambler, Suzy Mueller, and Sven Efftinge!
Date: 17 Jun, 2021
📣 Delve's native DAP implementation is now available for use. In order to use this new debug adapter (dlv-dap) when debugging Go programs, add the following settings in your settings.json:
"go.delveConfig": { "debugAdapter": "dlv-dap", },
Please learn more about the new adapter's features and configuration parameters, and share your feedback and report the issues in our issue tracker.
A list of all issues and changes can be found in the v0.26.0 milestone and commit history.
dlv-dap is ready for use in local debugging."Go: Test Function At Cursor or Test Previous" command. (PR 1509)"Go: Add Imports" command uses gopls instead of gopkg. This requires gopls@v0.7.0 or newer. (Go Issue 43351)"Go: Lint Workspace" that failed no editor is active. (Issue 1520)gopls crash caused by Untitled files. (Issue 1559)Thanks for your contributions, @mislav, @marwan-at-work, @findleyr, @lggomez, @fflewddur, @suzmue, @hyangah!
Date: 24 May, 2021
A list of all issues and changes can be found in the v0.25.1 milestone.
/ when applying substitutePath debug configuration. (Issue 1497)go.goroot setting is used. (Issue 1501)dlv-dap. Some of newest additions to dlv dap include optimized function detection, exception info, pause, function breakpoints while running, evaluate over hover, set variables. Documentation of current features and limitations can be found in the documentation.Thanks for the contribution, @suzmue, @fflewddur!
Date: 12 May, 2021
A list of all issues and changes can be found in the v0.25.0 milestone.
If you have a feature requests for this extension, please file it through the github issue tracker.
dlv-dap. Documentation of current features and limitations can be found in the documentationGo: Initialize go.mod command to run go mod init in the current workspace folder (Issue 1449)program in debug configuration to determine mode in auto (Issue 1422)dlv-dap if autoUpdates enabled (Issue 1404)editor.suggest.snippetsPreventQuickSuggestions to false by default to enable code completion and quick suggestions inside a snippet (Issue 839)GOROOT to the user specified GOROOT in go.gorootdlv-dap to shut down gracefully and clean up debugged process (Issue 120)Thank you for your contribution, @hyangah, @JadenSimon, @rstambler, @polinasok, @rfindley, and @suzmue!
Date: 19 Apr, 2021 A list of all issues and changes can be found in the v0.24.2 milestone.
lintOnSave feature. (Issue 1429)dlv-dap installation to correcly use GOBIN environment variable. (Issue 1430)dlv-dap. (Issue 1426)substitutePath and shadowed variable annotation.Date: 15 Apr, 2021
dlv-dap by default for all launch configurations (including codelenses), set the debugAdapter field in the go.delveConfig setting (Issue 1293)dlv-dap is now available hereDate: 6th Apr, 2021
🧪 We re-enabled the option to use dlv dap (Delve‘s native DAP implementation) instead of the old debug adapter when debugging go code. See the documentation to learn more about Delve’s native DAP implementation, and how to choose dlv dap.
Full list of issues and changes can be found in the v0.24.0 milestone and the changes since v0.23.3.
dlv dap for debugging.staticcheck if it is enabled in gopls. (CL 301053)go list to check availability of newly released gopls. (CL 295418)go env -json to query go env variables. (CL 301730)go.overwriteGoplsMiddleware setting.Thanks for the contributions, @hoanggc, @suzmue, @rstambler, @polinasok!
Date: 19th Mar, 2021
Date: 12th Mar, 2021
Date: 11th Mar, 2021
🎉 We use staticcheck as the default lint tool. We also changed to use goimports for formatting when not using gopls.
This version requires VS Code 1.52 or newer.
A list of all issues and changes can be found in the v0.23.1 milestone and the changes since v0.22.1
dlv-dap start logic (Issue 1270) and improved output/error message forwarding. (CL 296930)goreturns. (CL 300430)gopls. (Issue 1153)gopls commands fail. (Issue 1237)gopls v0.6.7+ (Issue 1224)Date: 4th Mar, 2021
Delve DAP is a new debug adapter embedded in dlv, the Go debugger. It is written in Go, understands Go's data types and runtime better, and is under active development. In this release, we added back access to Delve DAP. Delve DAP is still in the experimental stage and we appreciate any feedback and bug reports!
A list of all issues and changes can be found in the v0.23.0 milestone and the changes since v0.22.1
processId to the command name of the process, ${command:pickProcess}, or ${command:pickGoProcess} a quick pick menu will show a list of processes to choose from."debugAdapter": "dlv-dap" is specified in launch.json configurations, the extension will use Delve DAP for the debug session. When using Delve DAP, install the dev version of dlv built from master (cd; GO111MODULE=on go get github.com/go-delve/delve/cmd/dlv@master) to pick up the latest bug fixes and feature improvement. (Issue 23, 822, 844)gopls auto-update. (Issue 1095)Go: Reset Global State and Go: Reset Workspace State commands are available for easier extension state reset.gopls."go.disableConcurrentTests") that prevents concurrent go test invocation. (Issue 1089)C:\Program Files\Go\bin, C:\Program Files (x86)\Go\bin\go.exe, the new default Go installation path in Windows.gts to enforce consistent coding style. (Issue 1227)latest branch.Thanks for your contributions, @Charliekenney23, @eneuschild, @suzmue, @stamblerre, @pjweinbgo, @polinasok!
Date: 8th Feb, 2021
"go.languageServerExperimentalFeatures" setting deprecation error messages. (CL 288133)dlv to the "go.alternateTools" example value list. (CL 289231)ini to 1.3.8 to address a vulnerability report from npm audit.Thank you for your contribution, @stamblerre, @hyangah, @patrasap0908!
Date: 26th Jan, 2021
gopls, is enabled by default. (Issue 1037)Thank you for your contribution, @suzmue, @stamblerre, @findleyr, @heschik, @hyangah!
Date: 21st Jan, 2021 A list of all issues and changes can be found in the v0.21.1 milestone.
Cannot get property 'get' of undefined error. (Issue 1104)"go.languageServerExperimentalFeatures" setting for users who depend on this to run custom vet analyzers. (Issue 1110)Date: 20th Jan, 2021
A list of all issues and changes can be found in the v0.21.0 milestone.
dlvFlags debug attribute is available for conveniently supply extra flags to dlv. (Issue 978)gotype-live automatically when the language server is enabled. (Issue 1021)"go.languageServerExperimentalFeatures" setting. (CL 280601). The documentLink feature is replaced with gopls's ui.navigation.importShortcut setting. The diagnostics feature replacement is still under discussion. Please provide feedback in Issue 50.Thank you for your contribution, @hyangah, @suzmue, @pjweinbgo, @stamblerre!
Date: 8th Jan, 2021
"gopls" settings to match gopls v0.6.2. (CL 279728)Date: 29th Dec, 2020
go installation path when go couldn't be found from the regular PATH (Issue 1065)Date: 22nd Dec, 2020
A list of all issues and changes can be found in the v0.20.0 milestone.
substitutePath config property allows users to translate their symlinked directories to the actual paths, and the local paths to the remote paths. See Launch Configurations and Remote Debugging for details.launch.json was added. (Issue 131)next is automatically cancelled by delve if interrupted, for example, because breakpoint is set. See Issue 787 for details. (CL 261078)tyf snippet for type name func() was added. (Issue 1002)gopls settings section definition based on gopls v0.6.0. (Issue 197, CL 278355)go.buildFlags and go.buildTags are propagated to gopls unless "gopls": {"buildFlags": ..} is set. (Issue 155)go.toolsManagement.checkForUpdates setting allows users to completely disable version checks. This deprecates go.useGoProxyToCheckForToolUpdates. (Issue 963)PATH setup issue. When go isn't found from PATH, the extension will check /usr/local/bin too (Issue 971).gopls if the existing version in the system is older than the minimum required version when the extension enables gopls automatically. (Issue 938)GOBIN setting. (CL 275877)go.overwriteGoplsMiddleware and marked deprecated settings.vsce package to detect packaging errors early.Thank you for your contribution, @hyangah, @suzmue, and @programmer04!
Date: 9th Dec, 2020
A list of all issues and changes can be found in the v0.19.1 milestone.
Run without Debugging for Windows. This was a regression found in v0.19.0 (Issue 918). godlvdap debug configuration from the stable version. It is still available in Go Nightly (Issue 960).Thank you for your contribution, @suzmue, @RomanKornev, @hyangah!
Date: 25th Nov, 2020
A list of all issues and changes can be found in the v0.19.0 milestone.
lispcase, pascalcase and keep as transform variants for go.addTags (Issue 906, 936) gomodifytags's --template flag (Issue 826) Thank you for your contribution, @pofl, @hyangah, @perrito666, @pjweinbgo, @quoctruong, @stamblerre, @skaldesh, and @suzmue!
Date: 30th Oct, 2020
A list of all issues and changes can be found in the v0.18.1 milestone.
Go: extract language server logs to editor command was added (CL 263526).Thank you for your contributions, @suzmue, @pjweinbgo!
Date: 23rd Oct, 2020
Unified Go status UI ⚡, many debugger feature improvements, and LSP 3.16 features! A list of all issues fixed with this release can be found in the v0.18.0 milestone.
go.mod file, and more. The old Go Modules status bar was removed in favor of this new unified status bar. See VS Code Go UI documentation to learn more about this.Go: Toggle gc details command toggles the display of compiler optimization choice for the open Go source file (CL 256658).3.16. Users of recent gopls can access new features such as Call hierarchy and Semantic tokens.gopls config as LSP initialization options for correct workspace symbols computation (CL 259138).for statement snippet (Issue 734).vendor directories from go.inferGopath disable mechanism (Issue 301).go.logging.level setting allows extra logging to help debugging extension issues (CL 256557).Go: Show Survey Config and Go: Reset Survey Config commands are available.gopls. (CL 258997).go command chosen from the current GOROOT/bin. This helps avoid using a different version of go command for asdf or direnv users (Issue 757).Thank you for your contributions, @suzmue, @vologab, @amitlevy21, @danielhelfand, @egonk, @quoctruong, @polinasok, @pjweinbgo, @stamblerre, @hyangah!
Date: 29th Sep, 2020
go is not found from PATH available to the extension, the extension tries a couple of well-known default locations to find the go binary. In this case, we need to mutate PATH so other tools including gopls or dlv can choose the same go version. (Issue 713).Date: 28th Sep, 2020
PATH/Path environment variable only if users explicitly configure to select the go command using go.goroot, go.alternateTools, or Go: Choose Go Environment menu. (Issue 679)go.coverMode to be default. (Issue 666)Thank you for reporting issues!
Date: 18th Sep, 2020
Go code debugging and code coverage support is getting better.
The extension will help you stay updated with the new Go releases.
call command. E.g. call myAwesomeFunc(). It is an experimental feature in Delve. Please see the current limitations. (Issue 100)Go Update Available status bar item will appear. This feature is available only if go.useGoProxyToCheckForToolUpdates is set true. (Issue 483)go.coverMode setting allows to use different coverage modes (atomic, count, set (default)). go.coverShowCounts, go.coverageDecorator.{coveredBorderColor, uncoveredBorderColor} were newly added. We are still investigating better ways to visualize the count coverage data; feedback and contribution is welcome! (Issue 256, 594)'~' in the cwd attribute of the launch configuration. (Issue 116)showGlobalVariables is disabled by default, and this change improves speed. You can still inspect the global variables by registering them in the WATCH section, or by configuring showGlobalVariables in launch.json. (Issue 138)gofumpt, gofumports is added to recognized formatters list. (Issue 587)go.toolsEnvVars configuration is changed. (CL 254370)go env failures. (Issue 555)GOROOT when invoking the gopkgs tool so gopkgs continues to work with different go versions without being recompiled. (CL 254137)Go: Locate Configured Go Tools are invoked. (Issue 457)GOROOT/bin to integrated terminal's PATH environment variable when go.goroot is set on OS X. (Issue 544)envFile in the launch configuration. We reworked how the environment variables configuration is processed during this cycle. Now the extension processes the envFile attribute instead of asking the debug adapter process to read the specified envFile. (Issue 452)go.installDependenciesWhenBuilding by default. When this is enabled, the extension runs go commands with -i, which is no longer recommended with recent versions of Go. (Issue 568)run test CodeLenses to gopls. This experimental feature can be enabled with the following setting:"go.useLanguageServer": true,
"gopls": {
"codelens": { "test": true }
}
Thank you for your contribution, @suzmue, @pjweinbgo, @ekulabuhov, @stamblerre, @tpbg, @FiloSottile, @findleyr, @quoctruong, @polinasok, @hyangah!
Date: 2nd Sep, 2020
"go.alternateTools" settings to accept any tool names without settings.json diagnostics warning. (Issue 526)Date: 5th Aug, 2020
go.goroot and go.toolsEnvVars (Issue 464, 413).Date: 3rd Aug, 2020
This version requires VS Code 1.46+.
Older versions of VS Code will not receive updates any more.
Go: Choose Go Environment command. When clicking the Go status bar that displays the currently active Go version, users will be prompted with the list of Go versions installed locally or available for download. This feature was built based on the golang.org/dl tools. The selected Go version applies to the workspace, takes precedence over the system default or the "go.goroot" and "go.alternateTools" settings, and persists across sessions. You can clear the choice by selecting the Clear Selection item. (Issue 253)$GOROOT/bin to the PATH or Path environment variable which then applies the change to the integrated terminal windows.launch type requests in debug or test mode. This is still in the early stages and requires dlv built from its unreleased, master branch. Subscribe to golang/vscode-go#23 for updates.Go: Apply Cover Profile applies code coverage for multiple packages (CL 238697). We fixed bugs in processing coverage profiles on Windows.go tool is found.GOMODCACHE environment variable, introduced in Go 1.15.-v option. This feature requires 1.14 or newer versions of Go (Issue 316).additionalProperties to false for the settings that don't expect more properties. This allows VS Code to handle these settings better in its new settings GUI (Issue 284).Go: Locate Configured Go Tools includes go env results (Issue 195).PATH environment variable adjustment when users use a wrapper as an alternate tool for go (CL 239697).gocode-gomod installation bug when GOPATH includes multiple directories (Issue 368).godef to locate standard packages correctly by passing the GOROOT environment variable.golangci-lint integration bug that prevented displaying the lint results correctly when linters like nolintlint are enabled (Issue 411).Go: Test Previous (Issue 269).json-rpc2 and lodash to address vulnerability reports from npm audit.Thank you for your contribution, fujimoto kyosuke, OneOfOne, Aditya Thakral, Oleg Butuzov, Rebecca Stambler, Peter Weinberger, Brayden Cloud, Eli Bendersky, Robert Findley, Hana Kim!
Date: 21st July, 2020
Date: 7th July, 2020
gopls error report suggestion and changed to send reports to the vscode-go issue tracker instead of the go issue tracker (cl/240506).preview note in the published extension (Issue 273).Date: 29th June, 2020
Go: Subtest At Cursor runs an individual subtest if the subtest's name is a simple string (cl/235447).go.trace.server controls tracing between VS Code and the language server (cl/232458). Unlike tracing using gopls flags, this controls client-side tracing, and does not require to restart the server to change the value. This client-side trace is presented in the gopls output channel. The server-side trace has been moved to the new gopls (server) output channel (cl/233598).GOROOT. We plan to add Go version switch, and other features using this status bar item.Go: Add Tags To Struct Fields prompts transform parameter input if the setting go.addTags.promptForTags is true (Issue 2546).Go: Locate Go Tools command output includes the GOBIN value. (cl/235197).go.gopath, go.goroot, go.toolsGopath are now machine-overridable (cl/236539, Issue 2981).GOROOT environment variable any more. go.goroot is used to select the go command under the specified directory (Issue 146).gopls version detection and upgrade logic when pre-release versions are involved (cl/235524).Run > Run Without Debugging (^F5) are now cleaned up when the run sessions end (cl/236879).go.alternateTools.go is set, the path to $(go env GOROOT)/bin is passed to underlying tools to ensure they use the same go version (cl/239697).pgrep on mac OS (cl/236538, Issue 90).Thank you for your contribution, Brayden Cloud, Bulent Rahim Kazanci, Eli Bendersky, Hana Kim, Polina Sokolova, Quoc Truong, Rebecca Stambler, Rohan Talip, Ryan Koski, Sean Caffery, Ted Silbernagel, Vincent Jo, and codekid!
Date: 8th June, 2020
This is the first version published with golang publisher ID. This version is functionally identical to 0.14.3 except the following modifications.
Rebecca Stambler (@stamblerre)
Date: 21st May, 2020
This is the last version published with ms-vscode publisher ID.
Date: 14th May, 2020
Go: Fill struct to work correctly when file has multi byte characters. PR 2611Date: 15th April, 2020
vscode-languageclient being used to make use of all the upstream fixes. This changes the min version of the VS Code for upcoming updates of this extension to be 1.41. Older versions of VS Code will no longer receive any updates from this extension.Date: 15th April, 2020
program attribute in the debug configuration pointing to a file, debug just the file and not the entire package. This allows one to debug single files when a folder has multiple files with the main function. Feature Request 1229 implemented with PR 3016go run . instead of passing the current file to the go run command when the command Run: Start Without Debugging command is executed with the program attribute in the debug configuration pointing to a folder. Previously, this would result in errors for cases when the current file uses members from a separate file in the same pacakge. Feature Request 3096 implemented with commit 78518d7eCarlton Henderson (@CarltonHenderson)
golangci-lint. PR 3112Alexandre Vilain (@alexandrevilain)
Go: Apply Cover Profile. PR 3119gopls release notes when prompting to update the tool.gopls with parameter hints is disabled , avoid showing the parameter hints after auto-completing a method. Fixes Bug 3075 with PR 3084Go: Locate Configured Go Tools that prints the location of the Go tools that this extension depends onRebecca Stambler (@stamblerre)
Date: 27th February, 2020
gopls get prompted to update the language server.Date: 3rd February, 2020
Go: Apply Cover Profile to apply code coverage decorators from a custom cover profile. Feature Request 1596 implemented with PR 2361envFile in the debug configuration now supports configuring multiple env files. Feature Request 1746 implemented with PR 2395Jakub Warczarek (@programmer04)
index with i. Feature Request 2943 implemented with PR 3010Date: 31st December, 2019
go.languageServerExperimentalFeatures which allows you to disable experimental features from the language server has been trimmed the features that can be thus disabled to the below as rest of the features are deemed to be stable.Restart language server if the language server had not started successfully.go.coverOnSingleTestFile to enable applying code coverage resulting from running all tests in current file either using the code lens run file tests or the command Go: Test File. Feature Request 2873 implemented with PR 2884Don't show again to the warning that appears on saving changes to files when in the midst of debugging. Feature Request 2880 implemented with PR 2906go.addTags and go.removeTags settings as placeholders in the input boxes that appear when running the Go: Add Tags To Struct Fields and Go: Remove Tags From Struct Fields commands. Feature Request 2929 implemented with PR 2944go.buildTags and go.testTags are respected by the Go: Debug Test At Cursor command. Fixes Bug 2953 with commit d6b6668go.testFlags are treated as arguments and not build flags by delve when debugging tests. Fixes Bug 2115 with commit 9ab7b8bffDate: 5th November, 2019
Date: 5th November, 2019
Rebecca Stambler (@stamblerre) & Ramya Rao (@ramya-rao-a)
gopls and prompt to update accordingly. This can be disabled using the new setting go.useGoProxyToCheckForToolUpdates.Rebecca Stambler (@stamblerre)
Go to Implementation feature when using the language server.Kaarthik Rao Bekal Radhakrishna (@karthikraobr)
highlight to go.languageServerExperimentalFeatures setting to allow disabling of the highlighting feature from language server. Fixes Bug 2664 with PR 2833nil value and zero length. Fixes Bug 2813 with PR 2839Go: Add Import command. Feature Request 2683 implemented with PR 2803gopls wiki and added link to recommended VS Code settings when using gopls. PR 2852Kegsay @Kegsay & Zac Bergquist (@zmb3)
Marcus Farkas (@ToothlessGear)
Date: 27th September, 2019
Go: Test All Packages In Workspace command failed to run tests since the last update.Go: Build Workspace command failed to run the build command since the last updategopls results in the extension throwing error & not working as expected since the last updatego vet . instead of go vet ./... when vetting current package for better performance.Date: 21st September, 2019
gopls that was introduced in the previous update, relied on making calls to https://proxy.golang.org. In this patch release, we replace such calls with a check against a known hard-coded value for the latest version of gopls. Details on the next steps here are captured in the issue 2776Date: 19th September, 2019
gopls can now be used when using Go from the tipgo.alternateTools setting to provide an alternative for gopls. PR 2660Date: 9th July, 2019
James George (@jamesgeorge007)
Date: 5th July, 2019
go.goroot and not go.gopath, go.toolsGopath setting to be of scope machine in order to support the latter two to be configured at worksapce level. More in this is discussed at 2576.Date: 2nd July, 2019
output attribute in the debug configuration when mode is set to test. Fixes Bug 2445 with commit 373f0743goimports instead of the default goreturns as the formatting tool when using modules without the language server, now has the option to not be shown again for cases when you don't want to use goimports. Fixes Bug 2578 with commit 658db8d4go.goroot, go.gopath and go.toolsGopath settings to be of scope machine as per upstream request 2576 from VS Code to better support remote scenarios.Date: 17th June, 2019
@BetaXOi & Joel Hendrix (@jhendrixMSFT)
Please note the feature of attaching to a local process using process id only works when the process is started by running the compiled code i.e the executable and not by using the command go run. This is a limitation from delve.
Go: Restart Language Server to restart the language server which previously was possible only by reloading the VS Code window. Feature Request 2500 implemented with PR 2530Rebecca Stambler (@stamblerre)
gopls by default and add the feature to provide to clickable Godoc links for import statements. PR 2518incrementalSync to go.languageServerExperimentalFeatures setting. If true, the language server will accept incremental document synchronization. PR 2493${workspaceRoot} and ${workspaceFolder} for the -vetTtool flag provided in go.vetFlags setting. Feature Request 2527 implemented with PR 2528${workspaceRoot} and ${workspaceFolder} for the values provided to the go.alternateTools setting. Feature Request 2543 implemented with PR 2544gotype-live to provide diagnostics as you type only when the user is not using gopls and is not in module mode. This is because gopls supports this feature out of the box and the tool doesnt support modules. Fixes Bug 1950 with commit d1bf95c5Date: 30th April, 2019
This patch release has fixes for the below bugs
go.autocompleteUnimportedPackages is enabled, packages show up in completion list when typing . after a variable or existing package.gopls.Date: 25th April, 2019
This patch release has fixes for the below bugs
gopls crashes when -trace is set in the go.languageServerFlags settinggo.useLanguageServer is set to true, but no language server can be foundDate: 23rd April, 2019
go.mod and go.sum files, thus providing syntax highlighting for them. Feature Request 1886 implemented with PR 2344gopls, the language server from Google as the one from Sourcegraph is no longer under active development. Also because gopls supports Go modules. PR 2383. Please read our updated README on language servers for the latest on what we recommend.goimports for formatting when using Go modules without the language server because goreturns(the default formatting tool) doesn't work with modules yet. Fixes Bug 2309GO111MODULE is set to on inside the GOPATH. Fixes Bug 2238 with commit 15f571e4Go: Extract to functionGo: Extract to variableshowGlobalVariables property in the go.delveConfig setting. Feature Request 2323 implemented with PR 2351Filippo Valsorda (@FiloSottile) & Vlad Barosan (@vladbarosan)
go.toolsGopath is different between workspaces. PR 1589Jackson Kearl (@JacksonKearl) & Vlad Barosan (@vladbarosan)
GOBIN when user has set go.toolsGopath setting. Fixes Bug 2339 with commit 9f99c30Date: 12th February, 2019
Date: 6th February, 2019
Date: 6th February, 2019
ListPackageVars command in delve. PR 2289Adrian Suwała (@Ashiroq) & * Vlad Barosan (@vladbarosan)
Go: Debug Test at Cursor to debug the test function under the cursor. This provides the same feature as the debug codelens, but in the form of a command. Feature Request 1088 implemented with PR 2059proc.go file when stepping in/out during debugging. Fixes https://github.com/Microsoft/vscode/issues/65920LoggingDebugSession to show logs from the VS Code debug adapter. Feature Request 858 implemented with PR 2081log which would be the old verbose. The new verbose will include logs from the VS Code debug adapter.Go to definition feature now works on individual files. Fixes Bug 2246 with commit 58817b8Go to definition feature now works for sub modules as well. Fixes Bug 2180 with PR 2262go doc processes being spawned. Fixes Bug 2152 with commit e4522ba1. This is done using the flag -excludeDocs in the go.gocodeFlags setting.Kaarthik Rao Bekal Radhakrishna (@karthikraobr)
Go: Install/Update Tools command. [PR 2235](https://github.com/ Microsoft/vscode-go/pull/2235)Date: 12th December, 2018
Rebecca Stambler (@stamblerre)
GO111MODULE is explicitly set inside GOPATH.Kaarthik Rao Bekal Radhakrishna (@karthikraobr)
Go to Type Definition & Peek to Type Definition commands. Feature Request 2121 implemented with PR 2136Date: 6th November, 2018
Kaarthik Rao Bekal Radhakrishna (@karthikraobr)
Copy Value, Copy as expression and Add to Watch features in the context menu on the variables pane in the debug viewlet. Feature Request 1990 implemented with PR 2020go.gopath & go.toolsGopath settings now support the use of environment variables using the format ${env:XXX}. Feature Request 1732 implemented with PR 1743nsf/gocode when using Go version 1.8 or older due to mdempsky/gocode#73golint and gogetdoc are no longer supported in Go version 1.8 or oldergo doc instead of godoc for the showing the documentation when hovering over symbols and the Signature Help widget.Engineering Updates
Documentation Updates
Date: 18th October, 2018
Fix for issue with installing/updating tools when using the Go: Install/Update Tools command. Bug 2024 fixed by Kaarthik Rao Bekal Radhakrishna (@karthikraobr) and Ramya Rao (@ramya-rao-a)
Date: 17th October, 2018
file to go.lintOnSave setting to enable linting just the current file instead of package/workspace on file save. Feature Request 1931 implemented with PR 1965select statements. PR 2004Go: Show All Commands feature. Feature Request 1822 implmented with PR 1952ShowerYing (@showerying), Ramya Rao (@ramya-rao-a)
godoc from the list of installable Go tools as it doesnt support CLI mode anymore. Use godoc binary which is shipped as part of the Go distribution instead.go.gocodePackageLookupMode setting. Note: This only applies when using nsf/gocode. Latest versions of the Go extension uses mdempsky/gocode by default. PR 1908go.gotoSymbol.includeImports was enabled.Documentation Updates
Engineering Updates
Nguyen Long Nhat (@torn4dom4n)
$workspaceRoot with $workspaceFolder. PR 1977Date: 10th October, 2018
Analysis Tools Missing warning for the forks of godef and gocode. They are needed only when using Go modules and there are prompts to install them when the extension detects the use of modules.Date: 3rd October, 2018
Rebecca Stambler (@stamblerre)
godef and gocode to provide Go to definition and Auto-completion features respectively when using Go modules. The binaries installed from these forks will have the suffix -gomod and will only be used when you use Go modules.Bianca Rosa de Mendonça (@biancarosa)
Go: Benchmark File, Go: Benchmark Package and codelens to run all the benchmarks in current file & package respectively. Feature Request 1522 with PR 1898 & PR 1899go.generateTestsFlags to provide flags for the gotests tool when generating tests. PR 1841Johan Lejdung (@johan-lejdung)
go.testTags to be used for running tests. This way, you can use the existing go.buildTags for compiling and a different set of tags for running tests. Feature Request 1842 implemented with PR 1877Analysis Tools Missing button in the status bar. PR 1922iferr and forr i.e “if err ...” the “for range”. Feature Request 1920 implemented with PR 1924Go: Test File command. Bug 1911useApiV1 setting/configuration with apiVersion. Feature Request 1876gogetdoc and gopkgs if using Go modules.go.inferGopath in workspace settings when using Go modules automatically.Go: Add Import command that gives you a list of importable packages to add to the import block of current fileGo: Browse Packages command that lets you browse available packages and their filesgo.autocompleteUnimportedPackages setting is enabled.Date: 30th August, 2018
Date: 16th August, 2018
Date: 13th August, 2018
auto. In this mode, the debugging sessions will run in test mode automatically if the current active file is a test file. Otherwise this defaults to the usual debug mode. Feature Request 1780"showLog": true is added to the debug configuration. PR 1815.go.toolsEnvVars setting which gets used by all Go tools in this extension will now be passed to dlv as well during debugging sessions. With this change you dont need to repeat the variables in the debug configuration if you have already added it in the settings. Feature Request 1839go.gopath command when run programatically by other extensions now returns the GOPATH as determined by this extension. Useful for other extensions that want to provide additional features but do not want to repeat the work done by this extension to determine the GOPATH.Date: 26th July, 2018
Go: Add Package to Workspace that will add selected imported package to the current workspace. Feature Request 1733 implemented with PR 1745Marwan Sulaiman (@marwan-at-work)
Go: Generate Interface Stubs command when using on an interface that is defined inside an “internal” folder.Bug 1769Date: 29th June, 2018
go.delveConfig to configure the use of v2 apis from delve to be used when debugging tests as well normal code. Feature Request 1735 implemented with PR 1749Date: 15th Jun, 2018
go.alternateTools to provide alternate tools or alternate paths for the same tools used by the Go extension. Provide either absolute path or the name of the binary in GOPATH/bin, GOROOT/bin or PATH. Useful when you want to use wrapper script for the Go tools or versioned tools from https://gopkg.in. PR 1297. Some scenarios:go to goapp when using App Engine Gogometalinter to gometalinter.v2 if you want to use the stable version of the toolgocode before updating and show appropriate message when failed to do so.Date: 6th June, 2018
Date: 4th June, 2018
golangci-lint as a linter. Feature Request 1693 implemented with PR 1693Minko Gechev (@mgechev) and Mark Wolfe (@wolfeidau)
revive as a linter. Feature Request 1697 implemented with PR 1699, PR 1703 and commit d31636go.coverageDecorator. Feature Request 1302 implemented with PR 1695.Frederik Ring (@m90), Ramya Rao (@ramya-rao-a)
go.languageServerExperimentalFeatures to opt-in to try such new features from the language server that might not be feature complete yet. Feature Request 1593 implemented with PR 1607~, ${workspaceRoot}, ${workspaceFolder} in the go.testFlags setting. Feature Request 928Go: Add Import shows up the list of imports ASAP. Fixes Feature Request 1450go.formatTool, go.lintTool or go.docsTool setting to a tool that they dont have installed yet.go.toolsEnvVars setting to the process that runs the language server.go.inferGopath setting is enabled. Feature Request 1525Go to Definition feature when the entire symbol is selected with cursor at the end. Fixes Bug 891.Date: 14th May, 2018
go.installDependenciesWhenBuilding to control whether the -i flag is passed to go build/go test when compiling. Feature Request 1464go env if not set as environment variable explicitly.go.toolsEnvVars arent being used. PR 1665Date: 4th May, 2018
go.gotoSymbol.includeGoroot. If enabled, the symbols from the standard library are included when doing a workspace symbol search using the Go to Symbol in Workspace command. Feature Request 1567 and PR 1604go.coverOnSingleTest. If enabled, code coverage will be shown in the editor when running individual tests. Feature Request 1637 and PR 1638const, package, type and var. PR 1624main in a test file if the folder contains a main.go. PR 1630go.testEnvVars and go.toolsEnvVars. Bug 1608Go to Implementation and Peek Implmentation commands when using the Go Language Server. Feature Request 1611Date: 3rd April, 2018
output option of delve in debug configuration.The location provided here is where delve will output the binary it then uses for debugging. PR 1564go build. PR 1573Go to Implementation to work both ways. Feature Request 1536go vet instead of go tool vet from Go 1.10 onwards as the latter now supports all vet flags. PR 1576Date: 20th February, 2018
Go: Fill Struct integrates the fillstruct tool that lets you fill struct fields with default values. PR 1506Kevin Wiesmüller @kwiesmueller
gopkgs fails to get packages that are needed to provide the completions for unimported packages. PR 1528Anatoly Milkov (@anatolym) and Christian Winther (@jippi)
Date: 10th February, 2018
Date: 8th February, 2018
Go: Build Workspace command or the setting "go.buildOnSave": "workspace" results in persistent error from trying to build the root directory with no Go files.Date: 9th January, 2018
goreturns is updated. Fixes Bug 1447~, $workspaceRoot and $workspaceFolder are now supported in the go.goroot settingDate: 5th January, 2018
go.inferGopath will now infer the correct GOPATH even in the below 2 cases which wasnt supported beforegocode to fix issue with code completion when there are unicode characters in the file. Fixes Bug 1431Insert Snippet commandspawn instead of exec when running formatters.onDebugResolve activation event instead of onDebug to avoid activating the Go extension when other type of debug sessions are startedgoreturns: PR sqs/goreturns#42. This in turn fixes Bug 613 and Bug 630Date: 19th December, 2017
${workspaceFolder} in the below settingsgo.gopathgo.toolsGopathgo.testEnvVarsgo.testEnvFileAnalysis Tools Missing message has bee updated to only appear for the tools backing basic features of the extensiongo.formatOnSave setting in favor of editor.formatOnSave. To disable formatting on save, add the below setting:"[go]": {
"editor.formatOnSave": false
}
This fixes the below issuesDate: 27th November, 2017
New commands
Go: Run on Go Playground to run the current file (only if all its dependencies are from the std library) in the Go Playground using goplay. PR 1270. Feature Request #1211go.playground to control whether to run and/or share a link to the playground and/or open the playground in the browser.Go: Benchmark Function At Cursor and Codelens for running benchmarks in test files. PR 1303. Feature Request #972Go: Lint Current Package and Go: Lint Workpsace to lint using the tool specified in the go.lintTool setting and the flags specified in the go.lintFlags setting. PR 1258. Feature Request #1041Go: Vet Current Package and Go: Vet Workpsace to vet using the flags specified in the go.vetFlags setting. Feature Request #1041Go: Build Current Package and Go: Build Workpsace to build using the flags specified in the go.buildFlags setting and build tags specified in the setting go.buildTags. Feature Request #287Go: Install Current Package to install the current package using the flags specified in the go.buildFlags setting and build tags specified in the setting go.buildTags. Feature Request #287Completion Improvements
gocode can now use gb specific rules when providing completions. Set the new setting go.gocodePackageLookupMode to gb to use this feature. Feature Request #547Performance improvements
autobuild feature of gocode which is known to slow completions is now disabled by default. Fixes Bug 1323-i flag when building, we do not rely on autobuild feature of gocode to ensure fresh results from dependencies.buildOnSave setting, then use the new Go: Build Current Package command once in a while to ensure the dependencies are up to date or enable the go.gocodeAutoBuild setting.go vet ./... instead of go tool vet -flags. Fixes Bug 1215Others
guru fails to provide references. Fixes Bug 1336go.buildTags setting. Fixes [Bug 1355]https://github.com/Microsoft/vscode-go/issues/1355).Date: 4th November, 2017
Date: 2nd October, 2017
We now have Multi Root support for Go. PR 1221 Please note:
Go to Symbol in workspace.package snippet completion is now smarter when suggesting package names. PR 1220. It suggestsmain when current file is main.go or there exists a main.go file in current folderinternal_test.go_test when current file is a test file- or ., then what appears after the - or . is suggested.go.useCodeSnippetsOnFunctionSuggestWithoutType is introduced. This allows completions of functions with their parameter signature but without the parameter types. Feature Request 1241Log methods from the testing package$workspaceRoot will now be resolved when part of go.testEnvVars and go.toolsEnvVars setting.Go: Browse Packages command will now include newly installed/built packages without the need for reloading VS Code.Go: Get Package is introduced to run go get on the package in the import statement under the cursor. PR 1222Date: 6th September, 2017
Date: 5th September, 2017
Go To Implementation command on interfaces. Feature Request #771.Go: Browse Packages to make browsing selected package faster. PR 1136helloweb that generates a web app with an http endpoint returning a greeting and current time. PR 1113log.Println. Fixes Issue #1120 with PR 1124Go: Test Package is run. You can disable this by setting go.coverOnTestPackage to false.go.coverOnSave was disabled.launch.json file anymore. When no GOPATH is provided this way, the debug adapter will now infer the GOPATH based on the path of the file/package being debugged. This fixes Issue #840.go.buildFlags, go.buildTags and go.testFlags settings. Fixes Issue #1117gometalinter and dlv will honor the go.toolsGopath setting. Fixes Issue #1110Date: 26th July, 2017
gometalinter, while only supporting a subset of the tools. Use the setting go.lintTool to try this.go.coverageDecorator to try this.Go: Browse Packages. Feature Request 330Go: Test all Packages in Workspacego.buildOnSave is set to workspace. Bug 1060go.buildTags when using gogetdoc. Bug 1024-i is passed as a build flag. Bug 1064Go: Add Import command is used. Bug 1056Go: Generate Interface Stubs should work when interface is prefixed with package pathDate: 9th June, 2017
go.testEnvFile to configure the location of a file that would have environment variables to use while running tests. PR 971key=value.go.test.EnvVars will override the aboveF5, the above will not be used. Continue to use the env and/or envFile property in the debug configurations in the launch.json file.go.buildOnSave, go.lintOnSave and go.vetOnSave now take values package, workspace or off instead of the previous true/false.true/false for these settings, they will work as they did before, but you will get a warning in your settings file.-i flag.gometalinter by using the --aggregate flag which aggregates similar errors from multiple linters.--- is anywhere in the fileGo: Test Function At Cursor fails.go.testEnvVars while debugging tests using codelensDate: 4th May, 2017
go.referencesCodeLens.enabled is deprecated in favor of go.enableCodeLens to control multiple types of codelens."go.enableCodeLens": { "references": false, "runtest": true }
Date: 3rd May, 2017
Find All References command. PR 933 and PR 938. You can disable this by updating the setting go.referencesCodeLens.enabled.go.coverageOptions to control whether you want to highlight only covered code or only uncovered code or both when code coverage is run. PR 945Go: Test Coverage In Current Package is renamed to Go: Toggle Test Coverage In Current Package and it does exactly what the name suggests. Toggles test coverage. Commit cc661daf--backend=lldb option in Mac by default. You can now change this default value by setting the backend property to native in the launch.json file. Commit 4beecf1. Root cause is expected to be fixed in delve itself and is being tracked in derekparker/delve/818go.toolsEnvVars where you can specify env vars to be used by the Go tools that are used in the Go extension. PR 932 and commit bca4dd5f. This fixes Bug 632 as well.Date: 4th April, 2017
gotype-live which is gotype with support for unsaved file contents. PR 903go.liveErrors controls this feature."go.liveErrors": { "enabled": true } to enable this feature"go.liveErrors": { "enabled": true, "delay": 500 } to update the delay (in milliseconds) after which gotype-live would be run post a keystrokelaunch.json file. PR 904launch.json file, GOPATH from settings wont be read. You will need to set it in the env property as before--config flag for gometalinter now supports the use of ${workspaceRoot} and ~ that allows users to provide config file path relative to workspace or home directory respectively. PR 909Go: Test All Packages in Workspace to run tests from all packages in the workspace.Date: 30th March, 2017 Fix for Bug 892 which breaks build when the user has multiple GOPATHs and the Go project being worked on is not the first one among the multiple GOPATHs. Commit d417fd6
Date: 29th March, 2017
Go: Add Tags command adds tags configured in go.addTags setting to selected struct fields. By default, json tags are added. Examples:xml tags, set go.addTags to {"tags": "xml"}xml with cdata option, set go.addTags to {"tags": "xml", "options": "xml=cdata"}json and xml tags, set go.addTags to {"tags": "json,xml"}Go: Remove Tags command removes tags configured in go.removeTags setting from selected struct fields.xml tags, set go.removeTags to {"tags": "xml"}go.addTags and/or go.removeTags to {"promptForTags": true}diff tool from Git or Cygwin are in the PATH in Windows. PR 866Ctrl+F5 or run the command Debug: Start Without Debugging to run using the currently selected launch configuration.launch.json file, then the current file will be run.type as debug and program that points to a Go file and not packageenvFile attribute in launch.json where you can provide a file with env variables to use while debugging. PR 849go.languageServerFlags that will be passed while running the Go language server. PR 882["trace"] to see the traces from the language server in the output pane under the channel “go-langserver”["trace", "logfile", "path to a text file to log the trace] to log the traces and errors from the language server to a file.Go: Install Tools command now installs delve as well in Linux and Windows, but not in Mac OSX. Commit 30ea096 Fixes Bug 874Go: Install Tools command now installs godoc. PR 854GOPATH as defined by the go env output as default. Use go binary from default platform specific locations when GOROOT is not set as env variable. Fixes Bug 873go.editorContextMenuCommands to control which commands show up in the editor context menu.go.gotoSymbol.ignoreFolders that allows to ignore folders while using the “Go to Symbol in Workspace” feature. This takes in an array of folder names (not paths). Best used to ignore vendor folders while doing a workspace symbol search. PR 795Date: 3rd March, 2017
Date: 28th February, 2017
go.useLanguageServer to use the Go language server from Sourcegraph for features like Hover, Definition, Find All References, Signature Help, Go to Symbol in File and Workspace. PR 750go.inferGopath. When true GOPATH will be inferred from the path of the folder opened in VS Code. This will override the value from go.gopath setting as well as the GOPATH environment variable. PR 762F5 to start the debug session. A launch.json is still required to debug tests or for advanced debug configurations. PR 769launch.json file. PR 794go.testOnSave. When true, all tests in the current package will be run on saving a Go file. The status of the tests will be shown in the status bar at the bottom of the VS Code window. It is not advised to have this on when you have Auto Save enabled. PR 810-v to the go.testFlags to get verbose output. PR 817Date: 30th January, 2017
go.toolsGopath for providing an alternate location to install all the Go tools that the extension depends on, if you don't want them cluttering your GOPATH. PR 351 and PR 737.Go: Install Tools command to install the tools to the new location.Go: Install Tools command now support gometalinter if it is your chosen linting tool. PR 735.gometalinter internally installs linters and expects them to be in the user's GOPATH, gometalinter will get installed to your GOPATH and not the alternate location specified in go.toolsGopath-i flag (for non main packages) which installs dependent packages, which in turn get used in subsequent builds resulting in faster builds in bigger workspaces. PR 718A new setting go.testFlags that can be used to run tests. If null, go.buildFlags will be used. PR 482
Customize flags for each of the test command by using different keybindings. PR 482. In the below example, ctrl+shift+t is bound to run the tests in current file with -short flag. The commands here can be go.test.package, go.test.file or go.test.cursor.
{ "key": "ctrl+shift+t", "command": "go.test.file", "args": { "flags": ["-short"] }, "when": "editorTextFocus" }
New toggle command Go: Toggle Test File that lets you toggle between your Go file and the corresponding test file. Previous commands Go: Open Test File and Go: Open Implementation For Test File have been deprecated in favor of this new command. PR 739. You can add a keyboard binding to this as below:
{ "key": "ctrl+shift+t", "command": "go.toggle.test.file", "when": "editorTextFocus && editorLangId == 'go'" }
If current file is not a test file, show error message while running test commands, instead of displaying success message. Fixes #303
cwd launch configuration argument. PR 714env property in launch.json will also be used to find dlv tool. PR 725.trace in launch.json to provide option to have verbose logging while debugging using vscode-debug-logger. PR 753. This will help in diagnosing issues with debugging in the Go extension.Date: 5th January, 2017
http.proxy setting while installing Go tools. PR 639godoc, godef, gogetdoc. PR 711go.autocompleteUnimportedPackages is now false to reduce noise in the suggestion list. Members of unimported packages will still show up in suggestion list after typing dot after package name.Date: 29th November, 2016
Date: 21st November, 2016
gogetdoc for Goto Definition , Hover and Signature Help features. PR 622 To use this, add a setting "go.docstool": "gogetdoc" to your settings and reload/restart VS Code. This fixes the below bugsnet packageDate: 10th November, 2016
go.formatOnSave due to popular demand.Date: 9th November, 2016
editor.formatOnSave and deprecating go.formatOnSave PR 578Go: Open Test FileGo: Open Implementation for Test FileGo: Generate unit tests ... commands. PR 610Date: 26th October 2016
Date: 26th October 2016
Date: 17th October 2016
Date: 12th October 2016
go.formatFlags to pass flags to the formatting tool PR #461gotests tool. Needs Go 1.6 or higher. PR #489Go: Generate unit tests for current fileGo: Generate unit tests for current functionGo: Generate unit tests for current packagego.testEnVars to pass environment variables to Go tests PR #498diff tool which is not available on Windows by default. You can install it from DiffUtils for Windowsgo.autocompleteUnimportedPackages to true. PR #497Go: Add Import command. PR #508gometalinter to Go 1.5 users since golint dropped support for Go 1.5 PR #509goimports. PR #470 and PR #509goreturns in Windows. PR #463Date: August 2016
Go: Install Tools PR #428showLog:true. PR #412godoc now appears on hover PR #424Date: July 2016
gometalinter as tool for linting PR #294showLog to toggle the debugging output from delve PR #352