版本信息:
go:1.8.3
windows: win7/64
idea-go-plugin:171.4694.61

在windows下,使用dlv进行调试的时候,如果golang程序引入了c模块,比如常用的sqlite模块,那么在调试的时候一定会发生这个错误:
· Could not determine version number: could not find symbol value for runtime.buildVersion·

现在这个问题已经解决了,解决方法就是go build 的时候加入-ldflags="-linkmode internal" ,这样就可以正常调试了。
如果用的是gogland ide,或者jetbrains其他ide,安装了golang插件,那么在Run/Debug Configurations时,可以在Go Tool arguments中加入
·-ldflags="-linkmode internal"·

具体见下图:
解决golang windows调试问题:Could not determine version number: could not find symbol value for runtime.bui...

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
  • 2021-09-17
  • 2021-10-25
  • 2021-09-20
  • 2021-10-09
  • 2021-12-29
猜你喜欢
  • 2021-06-29
  • 2021-07-29
  • 2022-12-23
  • 2021-10-30
  • 2022-12-23
  • 2021-11-01
  • 2021-09-05
相关资源
相似解决方案