Golang : Debug with Godebug

A quick note on debugging in Golang and the latest tool that a sane Golang developer should check out and use.

  1. No sane programmer will claim to have written bug free programs throughout this her/his career.

  2. A program will not be bug free ... simply because the tool/compiler used to create the program is also not entirely bug free.

  3. A programmer job is to test and debug the program as much as possible.

  4. Just found out about this excellent cross-platform debugging tool created specifically for Golang - Godebug ( https://github.com/mailgun/godebug )

  5. Godebug modifies the code runs and stops at breakpoints. Letting you to step through the program and inspect variables.

  6. Still pretty new and hope to see IDEs integration in future to make it interactive.

  7. Also, good read at http://blog.golang.org/cover and old ways of debugging Go program at http://golang.org/doc/gdb

Reference :


By Adam Ng

IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.