Last active
August 29, 2015 14:08
-
-
Save olebedev/712d92fe2e01e754eaf1 to your computer and use it in GitHub Desktop.
Golang test debugging snippet for cgdb
This file contains 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
#!/usr/bin/env bash | |
rm go-swarm.test || true | |
nohup go test -c -gcflags '-N -l' -work github.com/olebedev/go-swarm | |
WORK=$(cat nohup.out) | |
rm nohup.out | |
cgdb go-swarm.test -- -d ${WORK#WORK=} || rm go-swarm.test || true | |
# gdb --tui go-swarm.test -d ${WORK#WORK=} || rm go-swarm.test || true | |
rm go-swarm.test || true | |
echo ${WORK#WORK=} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
And after starting the script you may type like this:
(gdb) b github.com/olebedev/go-swarm/emitter_test.go:29