Skip to content

Instantly share code, notes, and snippets.

@yukidarake
Last active August 29, 2015 14:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yukidarake/fee207588956ebc00d2f to your computer and use it in GitHub Desktop.
Save yukidarake/fee207588956ebc00d2f to your computer and use it in GitHub Desktop.
PIGGO#4

golangのデバッグ

デバッグツール

今のところgdb以外なさげ・・・IDEで動くとの情報はなくはないが・・・ cgdbなるCUI向けフロントエンドはある

gdbインストール

つらい道のり
http://qiita.com/takahashim/items/204ffa698afe09bd4e28

brew tap homebrew/dupes
brew install gdb

cgdbでデバッグしてみよう

このモジュールを使う

https://github.com/yukidarake/qc

go get github.com/yukidarake/qc/cmd/qc
cd $GOPATH/src/github.com/yukidarake/qc
go build -gcflags '-N -l' cmd/qc/qc.go

cgdbマニュアル

http://cgdb.github.io/docs/cgdb.html#Controlling-CGDB

インストール

brew install cgdb

ブレークポイントの貼り方

cgdb modeでSPACEを押す

コマンドへの引数の渡し方

run arg

みたいに渡す

参考リンク

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