2

When I run delve as below, it errors about internal packages. How to overcome it?

$ dlv debug cmd/geth/main.go
cmd/geth/main.go:35:2: use of internal package not allowed
exit status 1
0

For those who meet the same question.

Delve need extra param -gcflags=all='-N -l' in the build cmd, you can build it manual instead of by running make geth:

go build -o ./build/bin/geth   -gcflags=all='-N -l' -v ./cmd/geth 

Then you can run

dlv  --headless --listen=:2345 --api-version=2 exec ./build/bin/geth -- ${yourGethParams}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.