解决GoLand无法Debug

kyaa111 1月前 ⋅ 52 阅读

go 1.20rc1

goland 2022.2.3

无法进行debug

控制台提示

WARNING: undefined behavior - version of Delve is too old for Go version 1.20.-1 (maximum supported version 1.19)

解决

  1. git clone [https://github.com/go-delve/delve.git](https://github.com/go-delve/delve.git)
  2. go install github.com/go-delve/delve/cmd/dlv@latest
  3. {GOPATH}/bin目录下生成dlv.exe
    替换goland自带的dlv, 在{goland-install-path}\plugins\go\lib\dlv\windows