在 Delve 调试器中禁用版本检查
时间:2024-03-25
浏览:370
作者:佚名
在使用 IntelliJ IDEA 调试 Go 程序时,可能会遇到因 Delve 调试器版本过旧而导致的退出错误。本文介绍了一种通过在 launch.json 配置文件中添加 `--check-go-version=false` 标志来禁用 Delve 版本检查的方法,从而解决此问题。
问题内容
我使用idea调试go程序,但由于错误而退出:
Version of Delve is too old for this version of Go (maximum supported version 1.13, suppress this error with --check-go-version=false)
如何添加 --check-go-version=false?
解决方案
您可以添加launch.json。
example:
{
"version": "0.2.0",
"configurations": [
{
"name": "DebugServer",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}",
"dlvFlags": ["--check-go-version=false"]
}
]
}本篇关于《在 Delve 调试器中禁用版本检查》的介绍就到此结束啦,但是学无止境,想要了解学习更多关于Golang的相关知识,请关注golang学习网公众号!
本文内容来源于互联网,如有侵权请联系删除。
近期热门
11.18
11.15
站内热门
最新文章
11.20
11.20
11.20
11.20
热门专题
