Open srinivasakp opened 1 month ago
Anyone working on this?
Seeing the same here. Makes dev containers not workable for any Go development on Mac. Quite the blocker for us.
Unfortunately, we need more information to triage. Do you have a minimal repro case that we can try?
And please follow https://github.com/golang/vscode-go/wiki/debugging#troubleshooting and share the trace.
Ah, is the dev container also running in an emulated program? Then, can you please take a look at https://github.com/go-delve/delve/issues/3714 and see if that describes your setup? If so, sorry that there is nothing we can help with.
@hyangah thank you for your response, I went through the issues 3714, and I can see that the issue is similar. However, I haven't tried to use the container build based on arm64 which I have to check and if that works then I my issue is solved, however I couldn't get much information on why the emulators program doesn't support for mac3 + dev container + amd64 container although you mentioned that you cannot help on this, but hoping that there will be solution in future because arm based devices need to fill up the gap on incompatibility.
by the way we are running go program within the docker container and it's used only for running go test and build the binaries.
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.21.3 linux/amd64 ( on container ) * Run `gopls -v version` to get version of Gopls from _the VS Code integrated terminal_. - v0.16.1 * Run `code -v` or `code-insiders -v` to get version of VS Code or VS Code Insiders. - 1.91.1 (Universal) * Check your installed extensions to get the version of the VS Code Go extension - v0.42.0 * Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > `Go: Locate Configured Go Tools` command. - # Tools Configuration ## Environment GOBIN: undefined toolsGopath: gopath: /workspaces GOROOT: /cam/tools/go PATH: /workspaces/bin:/cam/tools/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PATH (vscode launched with): /vscode/vscode-server/bin/linux-x64/f1e16e1e6214d7c44d078b1f0607b2388f29d729-legacy/bin/remote-cli:/workspaces/bin:/cam/tools/go/bin:/cam/tools/gnu/gcc/11.3.0/rhe7-x86_64/bin:/cam/tools/gnu/binutils/2.40/rhe7-x86_64/bin:/cam/tools/swig/swig/4.1.1/rhe7-x86_64//bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ## Tools go: /cam/tools/go/bin/go: go version go1.21.3 linux/amd64 gopls: /workspaces/bin/gopls (version: v0.16.1 built with go: go1.21.3) gotests: /workspaces/bin/gotests (version: v1.6.0 built with go: go1.21.3) gomodifytags: not installed impl: not installed goplay: not installed dlv: /workspaces/bin/dlv (version: v1.23.0 built with go: go1.21.3) staticcheck: /workspaces/bin/staticcheck (version: v0.4.7 built with go: go1.21.3) ## Go env Workspace Folder (uniSched): /workspace/src/uniSched GO111MODULE='on' GOARCH='amd64' GOBIN='' GOCACHE='/root/.cache/go-build' GOENV='/root/.config/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='amd64' GOHOSTOS='linux' GOINSECURE='' GOMODCACHE='/workspaces/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='linux' GOPATH='/workspaces' GOPRIVATE='' GOPROXY='https://proxy.golang.org,direct' GOROOT='/cam/tools/go' GOSUMDB='sum.golang.org' GOTMPDIR='' GOTOOLCHAIN='auto' GOTOOLDIR='/cam/tools/go/pkg/tool/linux_amd64' GOVCS='' GOVERSION='go1.21.3' GCCGO='gccgo' GOAMD64='v1' AR='ar' CC='gcc' CXX='g++' CGO_ENABLED='1' GOMOD='/workspace/src/uniSched/go.mod' GOWORK='' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' PKG_CONFIG='pkg-config' GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build914308139=/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 thego.
or["go"]
orgopls
prefixes.Describe the bug
This issues is specifically on Mac 3 silicon
Installed Xcode ( 15.4 (15F31d) ) Installed VSCode ( 1.91.1 (Universal) ) dev container extension ( v0.375.1 ) golang in container ( go1.21.3 linux/amd64 ) install docker desktop ( 4.32.0 (157355) )
We are using dev container integrated with vs code for golang project, the setting devcontainer.json has all details related to the docker image to use for the development work, when we rebuild the the container ( command palette), tools will be installed along with golang and all the dependencies.
Once the project is set and the container is ready for developemnt, import the project and navigate to one of the test file, we test the code with debug_test option available in the vs code
As soon as the Debug Test is clicked, and continue by clicking continue button, the vs code throws following error message
Starting: /workspaces/bin/dlv dap --listen=127.0.0.1:36991 --log-dest=3 from /workspace/src/TestCode DAP server listening at: 127.0.0.1:36991 Type 'dlv help' for list of commands. 2024-07-19T06:46:49Z error layer=dap runtime error: input/output error 2 Unable to retrieve goroutines: input/output error PASS Process 21251 has exited with status 0 Detaching dlv dap (21021) exited with code: 0
Steps to reproduce the behavior:
Screenshots or recordings