Closed
Description
What version of Go, VS Code & VS Code Go extension are you using?
- Run
go version
to get version of Go- go version go1.14.4 linux/amd64
- Run
code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders- 1.45.1
5763d909d5f12fe19f215cbfdd29a91c0fa9208a
x64
- 1.45.1
- Check your installed extensions to get the version of the VS Code Go extension
- 0.14.3
- Run
go env
to get the go development environment details- GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/carsten/.cache/go-build"
GOENV="/home/carsten/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/carsten/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/snap/go/5830"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/snap/go/5830/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/carsten/projects/TickImporter/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build126575450=/tmp/go-build -gno-record-gcc-switches"
- GO111MODULE=""
Share the Go related settings you have added/edited
"go.gopath": "~/go",
"go.useLanguageServer": true,
"go.addTags": {
},
"[go]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
},
// Optional: Disable snippets, as they conflict with completion ranking.
"editor.snippetSuggestions": "none",
},
"[go.mod]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
},
},
"gopls": {
// Add parameter placeholders when completing a function.
"usePlaceholders": true,
// If true, enable additional analyses with staticcheck.
// Warning: This will significantly increase memory usage.
"staticcheck": false,
},
"go.lintTool": "golangci-lint",
"go.testFlags": ["-v"]
Describe the bug
Using the 'run test' annotation or the Go: Test Package
does nothing.
Steps to reproduce the behavior:
- Open any file with unittests
- Click on 'run test'
- See Output in Go Tests
Running tool: /snap/bin/go test -timeout 30s -coverprofile=/tmp/vscode-go5Q7PrY/go-code-cover -v
The output of gopls and go show no issues.
Running this exact command via the commandline works fine. Also from the terminal within vscode.
Checking the developer tools i only see the following warning:
[Extension Host] console.ts:137
Not able to determine version from the output of the command "/snap/bin/go version":
When i watch the Process Explorer closely i see the the go test
process starting and a subprocess for the linker for a very short time. I did not manage to capture a screenshot.
I am running ubuntu 20.04 and have go and vscode installed via snap. I am using gopls as can be seen in the config above.
Any hints how i can debug this issue further?