Skip to content

Commit 1707d4b

Browse files
committed
README: add troubleshooting section, some cleanup
Change-Id: I92cd750dcfb393bf7cd33257f02d8d57c369f534 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/286472 Trust: Rebecca Stambler <[email protected]> Run-TryBot: Rebecca Stambler <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
1 parent cc04c37 commit 1707d4b

File tree

1 file changed

+49
-45
lines changed

1 file changed

+49
-45
lines changed

README.md

Lines changed: 49 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88
provides rich language support for the
99
[Go programming language](https://golang.org/).
1010

11-
> 📣 We will enable the language server ([`gopls`]) by default in the end of Jan
12-
> 2021. We recommend switching to the language server now
13-
> (`"go.useLanguageServer": true`) to confirm it works well for you. Please
14-
> [file a new issue](https://github.com/golang/vscode-go/issues/new/choose) if
15-
> you notice bugs or missing features.
16-
1711
## Quick Start
1812

1913
Welcome! 👋🏻<br/>
@@ -23,7 +17,7 @@ extension fits your needs and enhances your development experience.
2317
* **Step 1.** If you haven't done so already, install [Go](https://golang.org)
2418
and the [VS Code Go extension].
2519
* [Go installation guide]. This extension works best with Go 1.14+.
26-
* [Manage extensions in VS Code].
20+
* [Managing extensions in VS Code].
2721
* **Step 2.** To activate the extension, open any directory or workspace
2822
containing Go code. Once activated, the [Go status bar](docs/ui.md) will
2923
appear in the bottom left corner of the window and show the recognized Go
@@ -40,23 +34,23 @@ extension fits your needs and enhances your development experience.
4034

4135
You are ready to Go :-) &nbsp;&nbsp; 🎉🎉🎉
4236

43-
Please be sure to learn more about many [features](#features) of this extension
44-
as well as how to [customize](#customization) them. Take a look at
37+
Please be sure to learn more about the many [features](#features) of this
38+
extension, as well as how to [customize](#customization) them. Take a look at
4539
[Troubleshooting](docs/troubleshooting.md) and [Help](#ask-for-help) for further
4640
guidance.
4741

4842
If you are new to Go, [this article](https://golang.org/doc/code.html) provides
49-
the overview on go code organization and basic `go` commands. The recent
50-
[Go open source live video] featured VS Code Go and demonstrated how other
51-
Gophers use the features to enhance their Go development workflow.
43+
the overview on Go code organization and basic `go` commands. Watch [this video
44+
from the Go Open Source Live conference] for an explanation of how to build
45+
your first Go application using VS Code Go.
5246

5347
## Features
5448

5549
This extension provides many features, including [IntelliSense],
56-
[code navigation], [code editing] support. It also shows [diagnostics] as you
57-
work and provides enhanced support for [testing] and [debugging] your programs.
58-
See the [full feature breakdown] for more details and to learn how to tune the
59-
behavior.
50+
[code navigation], and [code editing] support. It also shows [diagnostics] as
51+
you work and provides enhanced support for [testing] and [debugging] your
52+
programs. See the [full feature breakdown] for more details and to learn how to
53+
tune its behavior.
6054

6155
<p align=center>
6256
<img src="docs/images/completion-signature-help.gif" width=75%>
@@ -68,68 +62,75 @@ In addition to integrated editing features, the extension provides several
6862
commands for working with Go files. You can access any of these by opening the
6963
Command Palette (`Ctrl+Shift+P` on Linux/Windows and `Cmd+Shift+P` on Mac), and
7064
then typing in the command name. See the
71-
[full list of commands](docs/commands.md#detailed-list) provided by the
65+
[full list of commands](docs/commands.md#detailed-list) provided by this
7266
extension.
7367

7468
<p align=center>
7569
<img src="docs/images/toggletestfile.gif" width=75%>
7670
<br/><em>(Toggle Test File)</em></p>
7771

78-
**⚠️ Note**: the default syntax highlighting for Go files is provided by the
72+
**⚠️ Note**: the default syntax highlighting for Go files is provided by a
7973
[TextMate rule](https://github.com/jeff-hykin/better-go-syntax) embedded in VS
8074
Code, not by this extension.
8175

8276
## Tools
8377

8478
The extension uses a few command-line tools developed by the Go community. In
85-
particular, `go`, `gopls`, and `dlv` are used to implement build/test, language
86-
features, and debugging functionalities of this extension. See the
87-
[tools documentation](docs/tools.md) for a complete list of tools the extension
88-
depends on.
89-
90-
In order to locate the command-line tools, the extension searches `$GOPATH/bin`
91-
and directories specified in the `PATH` environment variable (or `Path` in
92-
Windows) with which the VS Code process has started. If the tools are not found,
93-
the extension will prompt you to install the missing tools and show the "⚠️
94-
Analysis Tools Missing" warning in the bottom right corner. Please install them
95-
by responding to the warning notification, or by manually running the `Go:
96-
Install/Update Go Tools` command. The extension will run the
97-
[`go get`](https://golang.org/cmd/go) command to install them.
79+
particular, `go`, `gopls`, and `dlv` **must** be installed for this extension
80+
to work correctly. See the [tools documentation](docs/tools.md) for a complete
81+
list of tools the extension depends on.
82+
83+
In order to locate these command-line tools, the extension searches
84+
`GOPATH/bin` and directories specified in the `PATH` environment variable (or
85+
`Path` on Windows) with which the VS Code process has started. If the tools are
86+
not found, the extension will prompt you to install the missing tools and show
87+
the "⚠️ Analysis Tools Missing" warning in the bottom right corner. Please
88+
install them by responding to the warning notification, or by manually running
89+
the [`Go: Install/Update Go Tools` command].
9890

9991
## Setting up your workspace
10092

10193
[Go modules](https://golang.org/ref/mod) are how Go manages dependencies in
10294
recent versions of Go. Modules replace the `GOPATH`-based approach to specifying
10395
which source files are used in a given build, and they are the default build
10496
mode in go1.16+. While this extension continues to support both Go modules and
105-
`GOPATH` mode, we highly recommend Go development in module mode. If you are
97+
`GOPATH` modes, we highly recommend Go development in module mode. If you are
10698
working on existing projects, please consider migrating to modules.
10799

108100
Unlike the traditional `GOPATH` mode, module mode does not require the workspace
109101
to be located under `GOPATH` nor to use a specific structure. A module is
110102
defined by a directory tree of Go source files with a `go.mod` file in the
111-
tree's root directory. Your project may involve one or more modules. If you are
112-
working with multiple modules or uncommon project layouts, you will need to
113-
configure your workspace so that the extension knows which code to load, so that
114-
features like references can work across modules. Please see the
115-
for information on supported workspace layouts.
103+
tree's root directory.
104+
105+
Your project may involve one or more modules. If you are working with multiple
106+
modules or uncommon project layouts, you will need to configure your workspace
107+
by using [Workspace Folders]. Please see this [documentation about supported
108+
workspace layouts].
116109

117110
## Customization
118111

119112
The extension needs no configuration and should work out of the box. However,
120-
you may wish to adjust settings to customize its behavior. Below are a few
121-
commonly used settings. Please see the
113+
you may wish to adjust settings to customize its behavior. Please see the
122114
[settings documentation](docs/settings.md) for a comprehensive list of settings.
123115
See [advanced topics](docs/advanced.md) for further customizations and unique
124116
use cases.
125117

118+
## Troubleshooting
119+
120+
If the extension isn't working as you expect, you can take a look at our
121+
troubleshooting guides. There is one for [general
122+
troubleshooting](docs/troubleshooting.md), and another specifically for
123+
[troubleshooting the debugging feature](docs/debugging.md#troubleshooting).
124+
126125
## Ask for help
127126

128-
If you're having issues with this extension, please reach out to us by
129-
[filing an issue](https://github.com/golang/vscode-go/issues/new/choose) or
130-
asking a question on the [Gophers Slack]. We hang out in the `#vscode` channel!
127+
If the troubleshooting guides did not resolve the issue, please reach out to us
128+
by [filing an issue](https://github.com/golang/vscode-go/issues/new/choose),
129+
[starting a GitHub discussion](https://github.com/golang/vscode-go/discussions),
130+
or by asking a question in the [Gophers Slack]. We hang out in the `#vscode`
131+
channel!
131132

132-
Take a look at [learn.go.dev](https://learn.go.dev) and
133+
Also, you can take a look at [learn.go.dev](https://learn.go.dev) and
133134
[golang.org/help](https://golang.org/help) for more general guidance on using
134135
Go.
135136

@@ -160,10 +161,10 @@ conduct-related issue, please mail [email protected].
160161
[Gophers Slack]: https://gophers.slack.com/
161162
[`gopls`]: https://golang.org/s/gopls
162163
[`go`]: https://golang.org/cmd/go
163-
[Manage extensions in VS Code]: https://code.visualstudio.com/docs/editor/extension-gallery
164+
[Managing extensions in VS Code]: https://code.visualstudio.com/docs/editor/extension-gallery
164165
[VS Code Go extension]: https://marketplace.visualstudio.com/items?itemName=golang.go
165166
[Go installation guide]: https://golang.org/doc/install
166-
[Go open source live video]: https://opensourcelive.withgoogle.com/events/go/watch?talk=session3
167+
[this video from the Go Open Source Live conference]: https://opensourcelive.withgoogle.com/events/go/watch?talk=session3
167168
[IntelliSense]: docs/features.md#intellisense
168169
[code navigation]: docs/features.md#code-navigation
169170
[code editing]: docs/features.md#code-editing
@@ -172,3 +173,6 @@ conduct-related issue, please mail [email protected].
172173
[debugging]: #debugging
173174
[full feature breakdown]: docs/features.md
174175
[workspace documentation]: https://github.com/golang/tools/blob/master/gopls/doc/workspace.md
176+
[`Go: Install/Update Go Tools` command]: docs/commands.md#go-installupdate-tools
177+
[documentation about supported workspace layouts]: https://github.com/golang/tools/blob/master/gopls/doc/workspace.md
178+
[Workspace Folders]: https://code.visualstudio.com/docs/editor/multi-root-workspaces

0 commit comments

Comments
 (0)