Go——Goland Debug报错Version of Delve is too old for this version of Go

Goland Debug报错
Version of Delve is too old for this version of Go (maximum supported version 1.12, suppress this error with --check-go-version=false)

1. 更新dlv
因为本地已经存在,所以,需要用到-u参数,强制更新包以及依赖

go get -u github.com/go-delve/delve/cmd/dlv@v1.8.0
注:如果get失败,可以直接去github用git下载github.com/go-delve/delve/cmd/dlv。
然后命令行进入到下载好的目录,直接go build编译dlv,将编译好的dlv.exe复制到../bin/目录下 或者 gopath 目录下

 

2. 设置Goland
打开 Hele->Edit Customer Properties,若提示文件不存在,点击创建。然后在新加一行 dlv.path=E:\\code\\go\\bin\\dlv.exe 重启就可以了

# custom GoLand properties
dlv.path=$GOPATH/bin/dlv

 

3、goland2020破解版下载

确解说明:
http://www.ddooo.com/softdown/167216.htm#dltab

 

4、为goland配置go sdk报错问题 

低版本的goland还需要配置GOROOT,但是在配置go1.17以上的时候就一直报这个错误

Goland配置GOROOT报错:The selected directory is not a valid home for Go Sdk

原因goland版本过低,当go版本大于1.17时就会报此异常。

解决方案:

编辑自己go安装目录下的:go\src\runtime\internal\sys\zversion.go

增加一行自己的版本:

const TheVersion = `go1.18.4`

5、设置 Go Modules 

GOPROXY=https://goproxy.io,direct

 

posted @ 2022-01-12 13:33  会飞的斧头  阅读(3746)  评论(0编辑  收藏  举报