This is a creation in Article, where the information may have evolved or changed.
Debuggers
Application programming needs good debugging support, and in this area still a lot of work needs to is done. A Debugger (Oogle): Support for GDB (at least version 7 was needed), the GNU debugger is being built in Go ' GC linker (6l, 8l) by the Go-team from Google (not for Windows and arm-platforms) (see also Http://blog.golang.org/2010/11/debugging)
Support for GDB version 7.1 is the build in Liteide and Goclipse.
If you don ' t want to use a debugger, the following is useful in a simple debugging strategy:
1) Use Print-statements (with Print/println and the FMT. Print functions) at the chosen Places 2) in FMT. Printf functions use the following specifiers to obtain complete info about variables:%+v gives us a complete output of t He instance with it fields% #v gives us a total output of the instance with it fields and qualified type name%T give S us the complete type specification
The To Go
35
3) Use a panic-statement (see§13.2) to obtain a stack trace (a list of all the called functions up until that moment) 4) Use the Defer keyword in tracing code execution (see§6.4).