IDE Goland DEBUG报错
在升级GO版本到1.11后发现Goland的Debug报错,错误信息如下:
1 | could not launch process: decoding dwarf section info at offset 0x0: too short |
原因是Goland的dlv不是新版本,导致不能debug调试。
解决办法:
- 更新dlv:go get -u github.com/derekparker/delve/cmd/dlv
- 修改goland配置,Help->Edit Custom Properties中增加新版dlv的路径配置:dlv.path=$GOPATH/bin/dlv
- 重启Goland,再次使用debug调试工具,就没有问题了。
IDE Goland DEBUG报错