3 ms·
The solution is to use gdb instead of printing variables in your code for debugging purposes. Go has great gdb support and gdb is a great debugger. There are a
by rartichoke 14y ago
The solution is to use gdb instead of printing variables in your code for debugging purposes. Go has great gdb support and gdb is a great debugger.
There are also multiple editors that support gdb plugins if you don't want to deal with it in its raw form which honestly isn't that bad once you're used to it.
I think I could say with a straight face that you will be able to debug a program faster with gdb than sprinkling about print statements even if you didn't have to worry about unused variables.
In other words, get used to what the language has to offer and then leverage it before saying it's annoying. The problem you have is 100% solved by gdb.