英文:
Mac OSX JetBrains Gogland: delve debugging meet "could not launch process: could not fork/exec"
问题
您好!根据您提供的信息,您在Mac OS上使用JetBrains Gogland 1.0 EAP进行开发,一切都正常,但是调试(基于delve)会引发错误:
could not launch process: could not fork/exec
您想知道如何解决这个问题。
英文:
I'm using JetBrains Gogland 1.0 EAP on Mac OS, everything works good, but debugging (based on delve) will raise the error
could not launch process: could not fork/exec
How can I fix it?
答案1
得分: 19
根据@Alexander的评论更新了答案。
事实上,Gogland使用的是自己的dlv二进制文件,而不是你手动安装的那个(或者通过brew install
安装的),而且它自己的dlv二进制文件似乎没有经过认证,或者可能在Mac的钥匙串中过时,这将导致每次运行时都出现上述错误。
要修复它:
- 安装自己的dlv:可以手动安装,也可以使用brew安装(官方文档),请确保证书已正确设置。
- 设置Gogland,将dlv路径指向你自己的dlv二进制文件:
- 步骤1:调用
Help | Edit Custom Properties…
,在其中添加一行:dlv.path=/path/to/custom/delve
- 步骤2:重新启动并尝试再次进行调试,应该可以解决问题。
- 步骤1:调用
英文:
> Updated the anwser according to @Alexander's comment
The truth is Gogland is using its own dlv binary, not the one you installed (manually or from brew install
), and its own dlv binary seems not certificated or could be outdated in Mac's keychain, then it will cause the error above each time we run it.
To fix it:
Install your own dlv
Installing it manually or using the brew both are ok [official doc] and please make sure your cert have been set correctly
Setup gogland, point dlv path to your own dlv binary
Step 1
Invoke Help | Edit Custom Properties…
and add new line there:
dlv.path=/path/to/custom/delve
Step 2
Restart and try to debug again, it should fix the issue.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论