by purple_ducks · 8y ago · 0 comments
Bizarre that a programming language designed by non first time language designers, backed by a multi-billion dollar company and used extensively throughout that company(by "new" engineers), doesn't have a world class debug story.
— Brian W. Kernighan, in the paper Unix for Beginners (1979)Having a debugger available does not drop your IQ by 20 points.
Not necessarily, but it can have that effect. Sometimes I spend a long time in the debugger, following the chain from effects to causes to the causes’ causes and so on, getting a little dopamine hit every time I uncover a new level – it’s exciting, like watching a detective show – and ultimately discovering the root cause… only to have it be something dumb or obvious, something I might have found in less time by just patiently rereading the code.
You can use a world class debugger, known as gdb, with Go, and yes, they do provide extensions for gdb to make it understand high-level Go constructs (such as goroutines, maps, slices, channels, ...): https://golang.org/doc/gdb
So if you want me to spell it out, here you go: it's bizarre to expect a debugger from modern compiled languages which have been FOSS from the beginning.
Also fails regarding other FOSS languages like Python, which have had a debugger since ever.
https://github.com/derekparker/delve
Apparently Delve supports Win and OSX/macOS too, though I've not tried it on those in years. On BSD though... there's no debugging story. :(
This is especially true in Go where the type checker gives you a lot of confidence that your code works before you run it.