Skip to content

Instantly share code, notes, and snippets.

@daxmc99
Created March 4, 2020 17:49
Show Gist options
  • Save daxmc99/55ab5dd8ce65a08727a399e4baed332b to your computer and use it in GitHub Desktop.
Save daxmc99/55ab5dd8ce65a08727a399e4baed332b to your computer and use it in GitHub Desktop.
Debugging go programs

Per https://blog.golang.org/debugging-what-you-deploy

Make sure to compile your Go program with inlining and optimizations disabled

Also this is targetted towards delve

go build -gcflags "all=-N -l" /my/go/program

(delve on the commandline does this automatically, not sure if Goland does)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment