1 前言
Goland版本:2018.1.5
Go:1.11.2
此版本調試不了bug,而且有時會顯示could not launch process: decoding dwarf section info at offset 0x0: too short。第二個bug是會去解析字符串中大括號,例如(Get single todo: curl -g 'http://localhost:8080/graphql?query={todo(id:"b"){id,text,done}}'),導致編譯不通過。
2 解決方案
升級到Goland 2及以上版本即可。
下載地址:https://www.jetbrains.com/go/download/#section=windows
3 舊方案
link:https://blog.csdn.net/woodcutter_man/article/details/83154788 應該是Goland的dlv不是新版本導致不能debug。 解決: 1、更新dlv,go get -u github.com/derekparker/delve/cmd/dlv 2、修改Goland的配置,Help->Edit Custom Properties中增加新版dlv的路徑配置:dlv.path=/path/go/bin/dlv
本人測試無效。