英文:
Go version 1.17.6 is too old for this version of Delve (minimum supported version 1.18, suppress this error with --check-go-version=false)
问题
你好,当我开始使用dlv调试Go程序时,它显示的消息是我的Go版本太旧了。我的Go版本是1.17.1,而我的dlv版本是1.20.1。所以我下载了go1.19并设置了路径环境变量。现在我的Go版本是1.19,但当我使用dlv进行调试时,它仍然显示以下消息:
Go版本1.17.6对于此版本的Delve来说太旧了(最低支持版本为1.18),可以使用--check-go-version=false来禁止此错误。
有人可以帮我解决吗?
我已经将Golang更改为1.19版本,但是消息显示"Go版本1.17.6太旧",但我确实下载了1.19版本的Golang并设置了路径环境变量。
英文:
Hi,when I start to use dlv to debug the go program. It shows the message means my go version is too old. My go version is 1.17.1 and my dlv version is 1.20.1. So I download the go1.19 and set the path environment. Now my go version is 1.19 and when I use dlv to debug, it also shows
Go version 1.17.6 is too old for this version of Delve (minimum supported version 1.18, suppress this error with --check-go-version=false)
can somebody help me out!
I have changed the golang to version1.19 but the message shows "Go version 1.17.6 is too old", but I did download the 1.19 golang and set the path environment.
答案1
得分: 1
如果你使用的是VSCode,你可以在launch.json中添加"dlvFlags": ["--check-go-version=false"]
。
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}",
"dlvFlags": ["--check-go-version=false"]
}
]
}
英文:
if you use vscode,you can add '"dlvFlags": ["--check-go-version=false"]' in launch.json
launch.json :
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}",
"dlvFlags": ["--check-go-version=false"]
}
]
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论