-
Notifications
You must be signed in to change notification settings - Fork 846
Description
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
- Run
go versionto get version of Go from the VS Code integrated terminal.- go version go1.22.0 windows/amd64
- Run
gopls -v versionto get version of Gopls from the VS Code integrated terminal.- golang.org/x/tools/gopls v0.14.2
- Run
code -vorcode-insiders -vto get version of VS Code or VS Code Insiders.- 1.86.2
- 903b1e9d8990623e3d7da1df3d33db3e42d80eda
- x64
- Check your installed extensions to get the version of the VS Code Go extension
- v0.41.1
- Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) >
Go: Locate Configured Go Toolscommand.
# Tools Configuration
## Environment
GOBIN: undefined
toolsGopath:
gopath: C:\Users\Andy Stratton\go
GOROOT: C:\Program Files\Go
PATH: C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\Go\bin;C:\mingw64\bin;C:\Users\Andy Stratton\AppData\Local\Microsoft\WindowsApps;C:\Users\Andy Stratton\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Andy Stratton\go\bin
## Tools
go: C:\Program Files\Go\bin\go.exe: go version go1.22.0 windows/amd64
gopls: C:\Users\Andy Stratton\go\bin\gopls.exe (version: v0.14.2 built with go: go1.22.0)
gotests: not installed
gomodifytags: not installed
impl: not installed
goplay: not installed
dlv: C:\Users\Andy Stratton\go\bin\dlv.exe (version: v1.22.1 built with go: go1.22.0)
staticcheck: C:\Users\Andy Stratton\go\bin\staticcheck.exe (version: v0.4.7 built with go: go1.22.0)
## Go env
Workspace Folder (quando): c:\Users\Andy Stratton\Dropbox\projects\quando
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Andy Stratton\AppData\Local\go-build
set GOENV=C:\Users\Andy Stratton\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\Andy Stratton\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\Andy Stratton\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.22.0
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=c:\Users\Andy Stratton\Dropbox\projects\quando\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\ANDYST~1\AppData\Local\Temp\go-build2733678842=/tmp/go-build -gno-record-gcc-switches
Share the Go related settings you have added/edited
Run Preferences: Open Settings (JSON) command to open your settings.json file.
Share all the settings with the go. or ["go"] or gopls prefixes.
- n/a
Describe the bug
A clear and concise description of what the bug.
- Seen first in go.mod, viewing the changes (working tree) - in the right hand pane - Ctrl Click on a url for a Github Go module - the url is opened in the browser, but silently in the background.
A clear and concise description of what you expected to happen.
- I would expect the opened tab to be brought to the front. Optionally just giving some feedback that it has been opened would be more useful than silence.
Note: as mentioned below there are some issues designing a solution for this - but this is still (to my mind) a usability issue/bug.
Steps to reproduce the behaviour:
Replicated by:
- In VS Code>>Source Control, open a (changed) go.mod file
- in the right hand pane (the left hand pane has no follow links...) Ctrl Click on an external module, e.g.
- require ... github.com/getlantern/systray v1.2.1
- (or hover and click the 'Follow link')
- There is no visible response, but the url has been opened in the browser in the background (Chrome in my case)
N.B. I have just had this work (partly) properly - when the browser has (just been) minimized: here is the partly correct (and still incorrect) behaviour (which may be a browser issue now...):
- Minimize browser (Chrome)
- Ctrl Click on Follow link (as above)
- Browser tab correctly opens
- Switch back to VS Code
- Ctrl Click on (the same or different) Follow link
- Browser is NOT brought to the front - even though a new tab has been opened...
Note: Similar behaviour happens with Ctrl Click for imported modules in go src - though this also gives other information in the VS Code window. This makes a common solution more difficult to design...
Screenshots or recordings
If applicable, add screenshots or recordings to help explain your problem.