Mac OSX JetBrains Gogland: delve调试遇到“无法启动进程:无法fork/exec”错误。

huangapple go评论109阅读模式
英文:

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的钥匙串中过时,这将导致每次运行时都出现上述错误。

要修复它:

  1. 安装自己的dlv:可以手动安装,也可以使用brew安装(官方文档),请确保证书已正确设置。
  2. 设置Gogland,将dlv路径指向你自己的dlv二进制文件:
    • 步骤1:调用Help | Edit Custom Properties…,在其中添加一行:
      dlv.path=/path/to/custom/delve
      
    • 步骤2:重新启动并尝试再次进行调试,应该可以解决问题。
英文:

> 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.

huangapple
  • 本文由 发表于 2017年3月25日 17:46:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/43014884.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定