在idea中配置了Go编程环境,可以运行Go程序,但是无法debug,报错error layer=debugger could not patch runtime.mallogc: no type entry found, use ‘types’ for a list of valid types
这是由于idea中使用的dlv.exe版本太老导致,直接在终端中执行如下命令安装最新版dlv.exe
go install github.com/go-delve/delve/cmd/dlv@latest
这会将dlv.exe安装到个人所设置的GOPATH目录下的bin目录中
打开idea的Help->Edit Custom Properties,添加一下dlv.exe的路径,然后重启idea即可
参考:https://stackoverflow.com/questions/75585793/version-of-delve-is-too-old-for-go-version-1-20-0-maximum-supported-version-1-1