1. Failed to launch: could not launch process: EOF
记一次 MacOS 下面的排错。
1.1. 起因
更换了 M1 新的 mac 本本后,在使用 vscode 调试 go 程序 run test
的时候报错: Failed to launch: could not launch process: EOF
。
随后 Google 了一下,发现 github 已经有一样的问题了: https://github.com/go-delve/delve/issues/1165
有很多种解决方法,其它能试的都试了,无果。只有一种方法没试,即下载旧版本的 Command Line Tool Tools。
出于谨慎考虑,我没有删除本地的 Command Line Tool Tools,而是下载了这个版本进行试装,但是其版本实在是太低,安装不上去,所以就放弃了。随后折腾了一天,网上搜集资料,最终还是大胆的删除了本地的 Library:
$ sudo rm -rf /Library/Developer/CommandLineTools
然后安装了在