解决golang windows调试问题:Could not determine version number: could not find symbol value for runtime.buildVersion
2017-07-15 11:20
741 查看
版本信息:
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"·
具体见下图:
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"·
具体见下图:
相关文章推荐
- could not launch process: Could not determine version number: could not find symbol value for runtim
- could not find implicit value for parameter extractor 问题的解决
- 安装J2EE的SDK报错:could not find the required version of the Java(TM)2 Runtime Environment in '(null)'的解决办法。
- 解决hello rails时Could not find a JavaScript runtime_(ExecJS::RuntimeUnavailable)问题
- 安装J2EE的SDK报错:could not find the required version of the Java(TM)2 Runtime Environment in '(null)'的解决
- CVS报错:could not find desired version问题的解决
- Could not find the required version of the Java(TM)2 Runtime Environment in '(null)' 解决办法
- iOS开发71-解决调试时Could not find Developer Disk Image问题
- 解决 Could not find com.android.tools.build:gradle 问题
- 安装J2EE的SDK报错:could not find the required version of the Java(TM)2 Runtime Environment in '(null)'的解决办法。
- 安装J2EE的SDK报错:could not find the required version of the Java(TM)2 Runtime Environment in '(null)'的解决
- 安装J2EE的SDK报错:could not find the required version of the Java(TM)2 Runtime Environment in '(null)'的解决
- 访问Storm ui界面,出现org.apache.storm.utils.NimbusLeaderNotFoundException: Could not find leader nimbus from seed hosts ["master" "slave1"]. Did you specify a valid list of nimbus hosts for confi的问题解决(图文详解)
- 真机调试出现Could not find Developer Disk Image问题解决办法
- 解决eclipse cdt “could not find symbol *** in index” 的问题
- 【已解决】Eclipse for Android 出现Could not find SDK folder....问题解决
- 安装J2EE的SDK报错:could not find the required version of the Java(TM)2 Runtime Environment in '(null)'的解决办法。
- JMeter命令行执行及问题解决 Error in NonGUIDriver java.lang.RuntimeException: Could not find the TestPlan class!
- 安装J2EE的SDK报错:could not find the required version of the Java(TM)2 Runtime Environment in '(null)'的解决办法。
- 真机调试解决could not find developer disk image的问题