Insert fmt.Printf() calls into your code. If you aren't familiar with how to get timestamped, filename:line-number prints
to create a log of your run, I demonstrate that here:
https://github.com/glycerine/vprint
In my experience, prints are how 99% of debugging should be done.
If you don't have a console (stdout), write them to a file instead.
On linux, the gdb debugger can give you alot of information. On windows, visual studio's debugger will do the same.
However debuggers are very slow to use compared to generating and analyzing a log file. The only real thing
that the debugger can do that logging cannot is to set watchpoints on memory locations (using special
purpose CPU facilities), and then to stop the program when that address is written.
On linux, strace is also quite helpful.