Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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)

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.

like image 980
JunjieFan Avatar asked Sep 20 '25 12:09

JunjieFan


2 Answers

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"] 
        }
    ]
}
like image 132
Ryan.Lee Avatar answered Sep 23 '25 09:09

Ryan.Lee


I have same problem, and I have solved it by replacing the DLV bound to Goland with a 1.8.0 support Golang 1.16 DLV version.

  1. download an older dlv version supporting your golang version, such as: my golang is 1.16 and dlv use this delve1.8.0

  2. complie dlv:

cd <downloadDir>/cmd/dlv 
go build
  1. edit goland properties: Help > Edit Custom Properities..., and add
dlv.path=<yourPath>/cmd/dlv/dlv
like image 36
ZoeGeng Avatar answered Sep 23 '25 07:09

ZoeGeng