[英]could not find __debug_line section in binary when runnig dlv debug test.go
Using macOS, installed dlv via brew install go-delve/delve/delve
使用macOS,通过brew install go-delve/delve/delve
安装的dlv
then try to debug a program in test.go like this: dlv debug test.go
然后尝试像这样在test.go中调试程序: dlv debug test.go
then got this error: 然后得到这个错误:
could not launch process: could not find __debug_line section in binary
Any suggestion? 有什么建议吗?
updated on 9/4 于9/4更新
I uninstalled the brew dlv and install like below, it still not work. 我卸载了brew dlv并按如下所示安装,它仍然无法正常工作。
localhost:dlv lua$ go get github.com/derekparker/delve/cmd/dlv localhost:dlv lua$ cd $GOPATH/src/github.com/derekparker/delve/cmd/dlv localhost:dlv lua$ go build localhost:dlv lua$ go install localhost:dlv lua$ pwd /Users/lua/go/src/github.com/derekparker/delve/cmd/dlv localhost:dlv lua$ dlv -bash: /usr/local/bin/dlv: No such file or directory localhost:dlv lua$
You can install it from the source code instead of using brew. 您可以从源代码安装它,而不是使用brew。
go get github.com/derekparker/delve/cmd/dlv
cd $GOPATH/src/github.com/derekparker/delve/cmd/dlv
go build
go install
This should fix this issue. 这应该可以解决此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.