- Http://www.golangtc.com/download downloading an installation package or a compressed package
- Configuring Environment variables
- Configuration goroot:
- Configure path: Last added in Path
- Configure the role of Gopath:gopath please Baidu, the specific directory can be defined by their own
- Required extensions
- Code autocomplete (using Gocode)
- Quick Tip information (using GODEF)
- Jump to Definition (using GODEF)
- Search references (using go-find-references)
- Document Outline (using Go-outline)
- Renaming (using Gorename)
- Save build (using Go build and go test)
- Code formatting (using Goreturns or Goimports or gofmt)
- Debug code (using delve)
- Install the extension (skip this step if you are using Visual Studio Code)
- Code completion extension, execution on the command line (example, other plugins same)
Go get-u-ldflags-h=windowsgui Github.com/nsf/gocode
Go Install Github.com/nsf/gocode
- Install Editor
- Download vs code (rating vs code): https://www.visualstudio.com/en-us/products/code-vs.aspx
- Press CTRL+SHIFT+P, enter install, select
- After selecting the extension package will be scanned, this process will be slow, and so on after the expansion package list to choose Go.
- Selecting the Go language will prompt you in the lower right corner
- Click on the tips above to see this prompt and click Install (the best sail in the process * * Qiang)
- The reinstallation process will report that some extensions under tools are not found. Execute "git clone https://github.com/golang/tools.git" on the command line (requires a pre-installation of Git)
- Move the cloned Tools folder to the C:\Go\GOPATH\src\golang.org\x file
- Perform 4, 5 steps again. Restart vs Code
- The VS code itself does not debug go codes and needs to be installed to debug the Go delve plugin.
- On the command line, perform "Go get-u-v github.com/derekparker/delve/cmd/dlv". OK, so you can debug it here.
Debugging go code with Visual Studio code under Windows