when trying to use the VSCode Debugger, I get an error message:
"Failed to launch: could not launch process: can not run under Rosetta, check that the installed build of Go is right for your CPU architecture"
some background context as I read solutions for similar questions:
I tried downloading dlv, but it doesn't work. Also tried the solution proposed here to run VSCode integrated terminal in x86-64.
Is there a way for the debugger to work with Apple M1 using go1.18 darwin/amd64?
I just got this issue on my M1 and was able to resolve. Here are my steps:
go to the go download page, https://go.dev/dl/ and download the arm version of go installer. Specifically, go.darwin-arm64.pkg
install go, if it detects a previous version, agree to replace
open terminal and verify go version and it should say "go version go darwin/arm64"
On VSCode, click on plugins, find the installed Go plugin, and uninstall then reload VSCode.
When the plugin installation is complete, press Ctrl + Shift + P in VSCode to bring up the Command Palette, then type go: Install and select go: Install/Update Tools, then click the first checkbox to install all Tools.
When Go Tools install is complete, reload VSCode and retry breakpoint.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With