-
-
Save nexneo/5484555 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Demo http://ascii.io/a/3019 | |
# build with debug flags | |
go build -gcflags "-N -l" -o out | |
# find the debugger comments | |
awk '/\/\/debugger/ { print "break " FILENAME ":" FNR; }' `find $PWD -name "*.go" | xargs` > .breakpoints | |
# launch gdb | |
gdb -x .breakpoints --args out "$@" | |
# clean up | |
rm .breakpoints out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice catch