I wanted to know how one can enumerate the names and values of all local variables in golang. This is done with the purpose of effectively debugging go code.
Yes, I am well aware golang has limited gdb support right now.
This commonly used thread on stackoverflow has no mention of golang.
I am genuinely looking for a solution (I think others are curious as well).
Many thanks.
There is no easy solution:
There is dlv, you can experiment with the print
command, it's the closest thing to a live debugger you can get atm.
Otherwise gotype/go-spew like @VonC mentioned are the way to go.