Add go.goroot
command
#2379
Labels
FeatureRequest
FrozenDueToAge
HelpWanted
Issues that are not prioritized by the maintainers. Help is requested from community contributors.
Milestone
Is your feature request related to a problem? Please describe.
I want to define use
GOROOT
andGOPATH
when definingsubstitutePath
in a remote debugging (attach
) configuration in launch.json.The only possible way I could find to use
GOPATH
is add{ "from": "${command:go.gopath}", "to": "/remote/go/path" }
, but I cannot do the same thing forGOROOT
since there's nogo.goroot
command.Describe the solution you'd like
Adding a
go.goroot
command, returning theGOROOT
value, just asgo.gopath
does forGOPATH
.Describe alternatives you've considered
I tried to use
"${env:GOROOT}"
and"${env:GOPATH}"
, but these env vars are not always defined.I tried to find a way to run a shell command in the same context (something like
"${shell:go env GOROOT}"
), but that also didn't work.I thought of working around this with a
preLaunchTask
, but couldn't find a way to use a task's output as an input for a launch configuration.Additional context
N/A
It seems pretty easy to do (unless I'm missing something), so I'm willing to submit a PR with this, if you'll accept.
The text was updated successfully, but these errors were encountered: