英文:
Go dlv: Failed to launch Version of go is too old for this verion of delve
问题
在调试模式下运行项目时,我遇到了以下错误:
> 无法启动,go的版本太旧,不支持此版本的delve(最低支持版本为1.15)
目前我的机器上安装的是go 1.13版本。如果我将go升级到1.15版本,调试器可以正常工作。但这不是我想要的解决方案。我希望能够让调试器与当前版本的go一起工作。如果你有任何解决方案,请告诉我。
提前感谢你的帮助。
英文:
I am getting this error while running the project in debug mode.
> Failed to launch Version of go is too old for this verion of delve(minimum supported
version 1.15)
Currently go 1.13 is installed in my machine. If I upgrade go to the version 1.15 debugger is working fine. But this not the solution I am looking for. I want to make the debugger work with the current version of go. If you have any solution for this please let me know.
Thanks for your help in advance.
答案1
得分: 5
可以禁用警告,但建议降级 Delve。
禁用警告的方法如下:
- 打开 launch.json 文件
- 添加以下标志:
"dlvFlags": ["--check-go-version=false"]
降级 Delve 的方法如下:
go install github.com/go-delve/delve/cmd/dlv@v<DELVE_VERSION>
例如,降级到 1.7.3 版本:
go install github.com/go-delve/delve/cmd/dlv@v1.7.3
检查已安装的 Delve 版本:
dlv version
更多详细信息请参考:https://github.com/go-delve/delve/tree/master/Documentation/installation
英文:
It's possible to disable the warning, but the recommended is downgrade Delve.
To disable the warning:
- Open launch.json
- Add this flag:
"dlvFlags": ["--check-go-version=false"]
To downgrade Delve:
go install github.com/go-delve/delve/cmd/dlv@v<DELVE_VERSION>
Example: Downgrade to 1.7.3:
go install github.com/go-delve/delve/cmd/dlv@v1.7.3
Check the Delve version for seeing that is installed:
dlv version
More details in: https://github.com/go-delve/delve/tree/master/Documentation/installation
答案2
得分: -3
我想让调试器与当前版本的Go一起工作。
"当前版本的Go"是Go 1.17,而不是1.13。
根据Go项目的发布政策,只支持最新的两个主要版本 —— 只有这些版本才会从Go项目中获得安全修复。
Go 1.17刚刚发布,所以今天支持的版本是Go 1.17和Go 1.16。出于安全考虑,你应该升级到Go 1.16或更高版本。(请参阅https://golang.org/doc/install获取说明。)
英文:
> I want to make the debugger work with the current version of go.
The “current version of go” is Go 1.17, not 1.13.
Per the Go project's release policy, only the two newest major releases are supported — only those releases receive security fixes from the Go project.
Go 1.17 was just released, so the supported releases today are Go 1.17 and Go 1.16. For security's sake, you really ought to upgrade to Go 1.16 or higher. (See https://golang.org/doc/install for instructions.)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论