Mac M1 Golang debug 问题解决方法

eflight · 2021-10-14 10:52:26 · 3497 次点击

好久没上来,发现图裂了步骤1、2就不补充了

步骤3中,是指 go env 后 GOARCH= 和 GOHOSTARCH= 的值

GOHOSTARCH 和你系统安装的golang版本有关,可以去下载 arm64 版本的golang安装

步骤4中 GOARCH="amd64" 的话 -> Run/Debug Configurations 在 Configuration 栏目下, 配置 Environment:GOARCH=arm64 Apply -> OK

补充:升级了新系统版本之后,有出现过以下报错: could not launch process: debugserver or lldb-server not found: install XCode's command line tools or lldb-server

解决: 打开「终端」,输入:xcode-select --install,等待安装完成

#2
更多评论

遇到第4个的问题了,图裂了,请问怎么解决

#1

抱歉,好久没上来,补充了说明,希望你已经解决

#3