fabric源码调试一:Version of Delve is too old for this version of Go

1、goland版本
在这里插入图片描述
2、go版本

go version go1.14.9 linux/amd64

3、在debug的时候会出现如下提示,Delve版本太低无法Debug

Version of Delve is too old for this version of Go (maximum supported version 1.13, suppress this error with --check-go-version=false)

4、解决3
方式一:
(1)安装dlv

wang@wang:~$ go get github.com/go-delve/delve/cmd/dlv

安装的路径是$GOPATH/bin
(2)将 Goland 使用的 dlv 路径重新指定:
goland–help–EditCustomProperties…(若提示文件不存在,点击创建即可)–文件中新增内容:

#your path to dlv
dlv.path=/home/wang/go/bin/dlv

(3)重启goland
方式二:
https://github.com/go-delve/delve/blob/master/Documentation/installation/linux/install.md

$ git clone https://github.com/go-delve/delve.git $GOPATH/src/github.com/go-delve/delve
$ cd $GOPATH/src/github.com/go-delve/delve
$ make install

5、go env -w GO111MODULE=on报错如下:

main.go:12:8: cannot find module providing package github.com/hyperledger/fabric/orderer/common/server: working directory is not part of a module

改为:
go env -w GO111MODULE=off
或者
go env -w GO111MODULE=auto

猜你喜欢

转载自blog.csdn.net/u010931295/article/details/108595948