You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
322e058 0.16.2 release CHANGELOG
368fc43 src/util.ts: allow getGoVersion when there is no active text editor
c23df8f src/goLanguageServer.ts: restart if go.toolsEnvVars changes
f8bce8c src/goBuild: remove misleading error message in modules mode
dcea773 src/goCover.ts: correct windows absolute filepath handling
02869c8 src/goPackages.ts: pass GOROOT to gopkgs
0b32079 docs/switch-version.md: add Go version switching documentation
1080e21 src/util.ts,goLanguageServer.ts: set cwd for cp.execFile
d594eec build: add setup_env to all.bash and update contributing.md
c705adf src/goInstallTools: report `go env` failure
f2fd351 src/debugAdapter: make filepaths in errors absolute
52260e0 src/goCover.ts: provide explicit directory for running go list
859bb8a src/goTools.ts: recognize gofumpt, gofumports formatters
d05379e test/integration: increase extension test timeout
43d6d04 package.json: let some commands activate extension
5a7752c src/debugAdapter: add delve 'call' command support
575abde src/goEnvironmentStatus: fix PATH mutation logic in osx
77bda0a test/gopls: print gopls traces when test fails
2c287db src/goDebugConfiguration: expand '~' in cwd attribute
bd77a6f src/testUtils.ts: always run test in package list mode
a7b1705 test/integration: add extra tests for env var combining
3ffb96e src/goCover: remove obsolete go.coverageDecorator support
da7328b package.json: disable debug config's showGlobalVariables by default
4b52e43 package.json: disable go.installDependenciesWhenBuilding by default
c7c4188 src/goDebugConfiguration: combine envFile and env
cd41bd1 .github/workflows, build: install dlv in containers
c169d13 src/utils/envUtils.ts: add parseEnvFiles
eeb2512 src/utils: move env var utilities to its own module
95570ec goLanguageServer: attach gopls version to issue reports
e15a8a2 docs: link to more VS Code docs, add alternative ways to start
8f16fe4 tools/generate.go: add defaults and enums to settings.md
9167ad2 docs: add stdlib.md
7f493bf src/goEnvironmentStatus.ts: notify user of available Go updates
1e4dbe2 src/testUtils.ts: fix parsing of the compiler error file expansion
47e2496 docs: fix out-of-sync documentation
139fd7d src/goCover.go: add go.coverMode to display coverage data and counts
d41272c src/util.ts: log `go version` output
6aa134d src/goInstallTools.ts: fix the installation failure message
e1603dd package.json: allow additional properties for alternateTools
56f2f9e src/goLanguageServer.ts: update middleware arguments to match gopls
5089f49 build,.github/workflows: use go1.15
2bd6cd6 docs: expand debugging instructions
f4f147c build: add line breaks to build/Dockerfile
116a0a0 package.json: prepare for 0.17.0 dev
bc9db1e CHANGELOG.md: cherry-pick v0.16.1 CHANGELOG update
aabbc51 src/goLanguageServer.ts: add config to overwrite vscode-go codelens
bec9cf3 src/testUtil.ts: switch to -json mode only if -v is set
9bdb768 build,.github/workflows: install all tools in modules mode
f9c0454 src/debugAdapter2: launch as an external process, and fix config
c3f97ff goLanguageServer: change survey prompt probability to 2.75%
d1404a0 src/goLanguageServer.ts: handle missing filterText in completion items
6a84918 src/goEnv.ts: readd go.toolsEnvVars variable substitution
c6695aa src/goMain.ts: reinstate the goroot var interpolation
c22bbe5 CHANGELOG.md: v0.16.0 release note
9523e4b src/goInstallTools.ts: avoid type check error
18eaf7e src/goEnvironmentStatus.ts: ignore uninstalled Go on network failure
fe3c6b5 package.json: require vscode 1.46 or up
9d1620b src/goLanguageServer.ts: add "debug test" and "debug benchmark" codelens
e3aa3a2 src: npm run fix-lint
d8f9560 src/goEnvironmentStatus.ts: handle failed getGoVersion call
dc9de1c src/util.ts: attempt to fix version parsing again
bd41c5e src/goLanguageServer.ts: fix broken event forwarding in middleware
Change-Id: I19a6f21822f3ea65b8868a26dd15f1522f8eb7d9
@@ -94,7 +94,6 @@ can see the details of the test results, but we will continue working to make th
94
94
95
95
Thank you for your contribution, fujimoto kyosuke, OneOfOne, Aditya Thakral, Oleg Butuzov, Rebecca Stambler, Peter Weinberger, Brayden Cloud, Eli Bendersky, Robert Findley, Hana Kim!
Copy file name to clipboardExpand all lines: docs/contributing.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,15 @@ If you make subsequent edits in the codebase, you can reload (`Ctrl+R`) the `[Ex
62
62
63
63
## Test
64
64
65
+
Simple unit tests that do not require interaction with VS Code are located in`test/unit`.
66
+
Tests in`test/integration` and `test/gopls` directories are integration tests. They involve invocation of the VS Code API and
67
+
require external Go tools installed in`GOPATH`. The command`setup_env`in [`build/all.bash`](https://github.com/golang/vscode-go/blob/master/build/all.bash)
68
+
installs all the tool dependencies in`GOPATH`.
69
+
70
+
1. `export GOPATH=/path/to/gopath/for/test`
71
+
1. `build/all.bash setup_env`
72
+
1. Unfortunately, VS Code test framework inherits your user settings when running tests [Issue 43](https://github.com/golang/vscode-go/issues/43). Make sure VS Code user settings do not contain any go related configuration, except `go.gopath` or `go.toolsGopath`incase you installed the tools fortestingin a different `GOPATH`.
73
+
65
74
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`), selectthe relevant launch configuration, and hit the Play button (`F5`).
Copy file name to clipboardExpand all lines: docs/debugging.md
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,13 +28,29 @@ This document explains how to debug your Go programs in VS Code. The Go debugger
28
28
29
29
[Delve] should be installed by default when you install this extension.
30
30
31
+
You may need to update `dlv` to the latest version to support the latest version
32
+
of Go—see [Installation](#installation) below.
33
+
31
34
### Installation
32
35
33
-
You can also install it manually in one of two ways:
36
+
You can also install Delve manually in one of two ways:
34
37
35
-
1. Open the Command Palette (Ctrl+Shift+P), select [`Go: Install/Update Tools`](settings.md#go-installupdate-tools), and select [`dlv`](tools.md#dlv).
38
+
1. Open the [Command Palette][] (Windows/Linux: Ctrl+Shift+P; OSX: Shift+Command+P), select [`Go: Install/Update Tools`](settings.md#go-installupdate-tools), and select [`dlv`](tools.md#dlv).
36
39
2. Follow the [Delve installation instructions](https://github.com/go-delve/delve/tree/master/Documentation/installation).
37
40
41
+
### Start debugging
42
+
43
+
1. Open the `package main` source file or the test file you want to debug.
44
+
2. Start debugging using one of the following options:
45
+
* Open the [Command Palette][], select
46
+
`Debug: Start Debugging`, then select `Go`.
47
+
* Open the debug window (Windows/Linux: Ctrl+Shift+D; OSX: Shift+Command+D) and click
48
+
`Run and Debug`, then select `Go`.
49
+
* Select **Run > Start Debugging** from the main menu.
50
+
51
+
See [the VS Code Debugging documentation](https://code.visualstudio.com/docs/editor/debugging)
52
+
for more information.
53
+
38
54
### Configuration
39
55
40
56
You may not need to configure any settings to start debugging your programs, but you should be aware that the debugger looks at the following settings.
@@ -50,7 +66,7 @@ You may not need to configure any settings to start debugging your programs, but
50
66
*`maxStructFields`: Maximum number of fields read from a struct. A setting of `-1` indicates that all fields should be read (default: `-1`).
51
67
*`maxVariableRecurse`: How far to recurse when evaluating nested types (default: `1`).
You can view the current Go version by looking at the status bar item in the bottom left corner of VS Code. Clicking this button will present you with a menu from which you can select any version of Go that exists in your $HOME/sdk directory or on <https://golang.org/dl>.
6
+
7
+
Previously, the `go.goroot` and `go.alternateTools` settings controlled the Go version used by VS Code Go. If you have configured these settings, they are no longer needed and should be deleted.
8
+
9
+
[](https://i.imgur.com/8qh2Tu2.png)
10
+
11
+
The "Clear Selection" option resets your Go version to the one found first in either `go.alternateTools`, `go.goroot` or your PATH.
12
+
13
+
## Installing a New Go Version
14
+
15
+
After selecting any Go version that has not yet been installed (such as Go 1.14.6 in the screenshot above), the binary will be automatically installed in $HOME/sdk and put to use in your environment.
16
+
17
+
Once the download completes, VS Code Go will make use of this new Go version.
0 commit comments