Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can use gdb - https://golang.org/doc/gdb



You 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


It'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 delve as mentioned other places is more of a true go debugger




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: