vscode安装dlv插件报错:There is no tracking information for the current branch.

vscode安装go语言的调试插件,按官方给出的方法很简单,在cmd下执行这个命令:

go get -u github.com/derekparker/delve/cmd/dlv
无耐的是,我一直报如下错误:
 go get -v -u -x github.com/derekparker/delve/cmd/dlv
github.com/derekparker/delve (download)
cd C:\Users\wangyiyin\go\src\github.com\derekparker\delve
git pull --ff-only
# cd C:\Users\wangyiyin\go\src\github.com\derekparker\delve; git pull --ff-only
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> master

package github.com/derekparker/delve/cmd/dlv: exit status 1
经地自己一番摸索,终于找到了解决办法。我们先进入"%GOPATH%\src\github.com\derekparker"(没有这些目录的话就自己手动创建,GOPATH这个环境变量也要事先配置好),将dlv文件夹删除(没有这个文件夹就忽略),然后在当前目录下执行下面的命令将dlv项目拷贝下来:

 git clone https://github.com/derekparker/delve.git
待所有文件下载完,再执行官方的安装命令:

go get -u github.com/derekparker/delve/cmd/dlv 
如果没有报错,那么就成功了,这时启动vscode验证下吧。
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值