Skip to content

Follow Link (from working tree) opens url in background - so no visible response/success  #3190

@andrewfstratton

Description

@andrewfstratton

What version of Go, VS Code & VS Code Go extension are you using?

Version Information
  • Run go version to get version of Go from the VS Code integrated terminal.
    • go version go1.22.0 windows/amd64
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
    • golang.org/x/tools/gopls v0.14.2
  • Run code -v or code-insiders -v to 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 Tools command.
# 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:

  1. In VS Code>>Source Control, open a (changed) go.mod file
  2. 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')
  1. 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...):

  1. Minimize browser (Chrome)
  2. Ctrl Click on Follow link (as above)
  3. Browser tab correctly opens
  4. Switch back to VS Code
  5. Ctrl Click on (the same or different) Follow link
  6. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions