硬件信息:
系统:MacOS 12.01
芯片:M1 Max
Goland:2021.3 Build #GO-213.5744.269
Go:go1.17.4 darwin/arm64
问题描述:
无法执行Debug,报错信息如下已无法找到,大致为:“Failed to fully copy pty output”
原因分析:
通过展开debug日志信息:

可以看到,Goland实际上运行了指令:
/Applications/GoLand.app/Contents/plugins/go/lib/dlv/macarm/dlv --listen=127.0.0.1:50990 --headless=true --api-version=2 --check-go-v

在M1 Max芯片的MacOS 12.01系统上,Goland 2021.3遇到Debug失败的问题,报错'Failed to fully copy pty output'。原因是Goland在Debug时使用delve,而M1运行x86软件会导致debug中断。通过编译arm架构的delve,并确保Goland、delve、Go版本匹配,问题仍未解决。进一步分析发现debugserver是x86架构。更新Xcode组件后,成功解决了debug问题。
最低0.47元/天 解锁文章
2439





