3 ms·
You can use gdb - https://golang.org/doc/gdb https://golang.org/doc/gdb
by timclark 11y ago
You can use gdb - https://golang.org/doc/gdb https://golang.org/doc/gdb
- codingvelocity 11y agoIt's largely accepted that while you can use gdb, it's not really good at debugging go code. from your own link.. "GDB does not understand Go programs well" https://github.com/derekparker/delve https://github.com/derekparker/delve delve as mentioned other places is more of a true go debugger
- 4ad 11y agoYou can also use mdb[1] though mdb is somewhat more suited to debugging the Go runtime itself rather then user programs. Mdb support for Go will be significantly improved in the short term. Also note that since Go has (optional) frame pointers, tools like DTrace, ktap, kprobes and uprobes, etc work much better (almost as well as for C). SystemTap works too, just that it chokes on Go DWARF without a patch. I will probably fix this soon. [1] https://www.joyent.com/blog/mdb-support-for-go https://www.joyent.com/blog/mdb-support-for-go