Mac M1 goland无法调试 Failed to launch: could not launch process: EOF

安装步骤:
1、官网安装arm64版本golang;
确保这个选项正确:GOARCH=arm64

2、官网安装支持m1的goland版本
这里选择最新版本的安装即可

3、安装arm64版本dlv

>> git clone https://github.com/go-delve/delve
>> cd delve
>> go install github.com/go-delve/delve/cmd/dlv
>>> dlv version
>> cd $GOPATH/bin
>> mkdir macarm
>> cp dlv macarm

打开goland,配置dlv的执行路径: 选 help>>Edit Custom Properties

# custom GoLand properties (expand/override 'bin/idea.properties')
dlv.path=$(你的GOPATH)/bin

问题产生:debug报错提示 Failed to launch: could not launch process: EOF

原因:从Mac Pro直接迁移了开发环境到Mac M1,里面的Command Line Tool Tools工具不匹配

解决办法:
删除本地的 Library:

$ sudo rm -rf /Library/Developer/CommandLineTools

然后安装 https://developer.apple.com/download/more/ 下载最新的稳定版: Command_Line_Tools_for_Xcode_13.2.dmg。这当中的过程是先删除、再重启、再安装。

参考:https://blog.csdn.net/wan212000/article/details/123340440

你可能感兴趣的:(开发环境,macos,xcode,ide)