Vscode 1.40: go tools not working anymore?

vsCode just upgraded to 1.40. And since then, the go tools don’t seam to work anymore.
For instance ctrl click on function doesn’t jump to function definition.
In test files, the commands to run or debug a test function are not visible anymore.
It looks like gopls is not working as well.

Any clue how I could fix this ? Can’t work.

2 Likes

That happened to me also. I had to basically do everything from the start again(because i couldnt find the actual issue). Things like setting up my GOPATH, GOROOT, the bin,pkg,src also. And after a hard try. It seems to work

1 Like

I finally found the issue. I erased the directory /usr/local/go by mistake. The cause became clear once I got a notification from vsCode that execution of go env failed. Restoring the directory /usr/local/go fixed the problem.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.