1

I compile my binary like this go build -gcflags '-N -l', but when I run them in dlv I get Warning: debugging optimized function. My guess it's that it's a different host than the build host and the sources are not available. Is there any way to work around this?

1
  • 2
    Use -gcflags="all=-N -l" when building the binary to apply flags to all packages (main and dependencies) Commented Apr 15 at 21:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.