Hi all, I've previously been using dlv for debugging but recently (perhaps since upgrading macos to Catalina?) I'm getting the following when attempting to debug applications or tests:
# runtime/cgo
ld: unknown option: -platform_version
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
Process exiting with code: 1
Has anyone else run into this issue and managed to fix it?
I've tried overriding them with
"go.toolsEnvVars": {
"PATH": "$HOME/go/bin:$PATH",
}
but it doesn't seem to evaluate $PATH, so it overrides all existing
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": “Launch Your Go File",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/cmd/main.go"
},
]
}
Hi -- I'm trying to setup remote development on a remote Ubuntu server from my local MacBook, via vscode remote ssh. My remote Ubuntu server has go1.13 installed:
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ubuntu/.cache/go-build"
GOENV="/home/ubuntu/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/ubuntu/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go-1.13"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.13/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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-build061610720=/tmp/go-build -gno-record-gcc-switches"
However, I can't seem to install vscode's Go extension onto my remote Ubuntu server. The Install on SSH: <ip>
button doesn't appear on the extension when browsing my locally installed extensions.
NobbZ
Depending on your definition of "normal text".
Hi all - Struggling with my configuration and need some help. I'm trying to use environment variables in my current project to inject secure configuration data that I will use for running go tests that leverage network services.
Every configuration I have tried fails to import/set the needed variables when I use "run test / debug test"
Currently I have tried using
"envFile" in my launch config to ${workspace}/.env
"env": { "key": "value" } in launch config
*Setting the "Go: Test Env File" to my .env file in the extension setting
(This actually create an error when running "debug tests" Cannot load environment variables from file <path>/.env
None of these seem to inject the needed variables into the environment so that I can us os.LookupEnv to retrieve them. Any clue what I'm doing wrong ? I'm on the latest version of VScode for Mac with current extensions.
My current launch.json looks like below.
Thanks in advance !
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [{
"name": "launch",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}",
"env": {
"LDAPUSER": "<redacted>",
"LDAPPASS": ""<redacted>,
"LDAPSERV": "<redacted>"
},
"args": [""],
"showLog": true
}]
}
Error on CreateBreakpoint: could not find file /root/mr-weather-backend/pkg/widget/v1/service.go