I use mostly Printf-based debugging, and still find delve useful at times.  
Primarily when I'm not sure exactly where in my code a bug arises, so I'll 
set a couple breakpoints, step through some code, and sometimes find I need 
to add some debug output in the problem area.  If delve had more output 
options (like hex dump of byte arrays), I'd probably use it even more.
Also, to avoid code bloat or performance impact, I use debug tags.
https://dave.cheney.net/2014/09/28/using-build-to-switch-between-debug-and-release

On Friday, 9 March 2018 20:10:59 UTC-4, Jason E. Aten wrote:
>
> This is not meant to be snide or flippant. Go actually made me learn 
> Printf based debugging, and I am a much better debugger for it.
>
> Add fmt.Printf() to your code. Or use a shortcut function like PP(), which 
> will automatically show where it was called from to. I use
> a file like vprint.go in all my projects:
>
> https://github.com/gijit/gi/blob/master/pkg/verb/vprint.go#L22
>
> You'll thank me when you get to multiple go routines. Printf restores 
> sanity to debugging, and a debugger is mostly useless.
>
> It turns out the Printf yields a much faster debugging process too.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to