您的位置:首页 > 编程语言 > Go语言

macOS 10.12.1 Idea调试Go程序遇到could not launch process: could not get thread count

2017-01-03 12:44 603 查看
我的Idea版本是2016.3,在macOS 10.12.1调试Go程序会发现报错:

could not launch process: could not get thread count

解决方案如下:

进入你的 $
GOPATH 目录

建立文件夹: 
$GOPATH/src/github.com/derekparker/

依次执行如下命令:

cd $GOPATH/src/github.com/derekparker/
git clone https://github.com/derekparker/delve.git[/code] 
cd delve

git fetch origin pull/665/head

git checkout FETCH_HEAD

CERT=dlv-cert make install


针对IDEA 2016.3版本,再执行如下命令,其它版本号请自行替换:

$ mv ~/Library/Application\ Support/IntelliJIdea2016.3/Go/lib/dlv/mac/dlv ~/Library/Application\ Support/IntelliJIdea2016.3/Go/lib/dlv/mac/dlv.orig
$ ln -s $GOPATH/bin/dlv ~/Library/Application\ Support/IntelliJIdea2016.3/Go/lib/dlv/mac/dlv

再尝试使用IDEA调试GO程序,成功!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Golang go macos