Using macOS, installed dlv via brew install go-delve/delve/delve
then try to debug a program in test.go like this: 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
I uninstalled the brew dlv and install like below, it still not work.
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$