5 ms·
> definitely miss a debugger or an REPL Bizarre that a programming language designed by non first time language designers, backed by a multi-billion dollar com
by purple_ducks 8y ago
> definitely miss a debugger or an REPL
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.
- weberc2 8y agoComing from Python, I've scarcely missed it, and I certainly wouldn't trade it for the myriad gains from switching to Go.
- dnautics 8y agoComing from python is somewhat of a low bar, compared to more modern and sophisticated PLs.
- weberc2 8y agoMaybe. I just meant that the debugger is a pretty big deal to Python developers, yet I don’t really miss it in Go.
- AlexCoventry 8y agoThe python debugger is great...
- weberc2 8y agoIt’s _fine_, but I rarely (almost never) find myself reaching for it. If I need the debugger, it’s probably a sign that I should be improving the logging so I can troubleshoot production issues. This is especially true in Go where the type checker gives you a lot of confidence that your code works before you run it.
- networkimprov 8y agoCould you define a view of "world class debug story"?
- w8rbt 8y agoI use pprof to find and fix bugs in Go apps. I just recently used pprof to find and report a huge memory leak in coreDNS (when using it as an authoritative DNS server for very large zones). I was able to find the bug and get it fixed in less than 24 hours. https://github.com/miekg/dns/issues/786 https://github.com/miekg/dns/issues/786 https://github.com/google/pprof https://github.com/google/pprof
- icedchai 8y agoNot really. In 20+ years of professional software development, I can count on one hand the times I needed a debugger.
- wrycoder 8y agoThe most effective debugging tool is still careful thought, coupled with judiciously placed print statements. — Brian W. Kernighan, in the paper Unix for Beginners (1979)
- coder543 8y agoI would like to think technology has advanced some since 1979.
- deleted 8y ago[deleted]
- oblio 8y agoAnd the most effective car crash prevention system (for now) is the human brain, yet I still want a seatbelt, airbags and good brakes on a car. Having a debugger available does not drop your IQ by 20 points.
- comex 8y ago> 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.
- oblio 8y agoYou can just not use the debugger...
- justinclift 8y agoThe debug story in Go is fairly decent these days for Linux, using Delve (the main "debugging" thing): https://github.com/derekparker/delve 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. :(
- tagrun 8y agoAnd I find this expectation rather bizarre. Since when compiled programming languages ship a debugger? 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 https://golang.org/doc/gdb
- pjmlp 8y agoLooking at commercial compilers, since the mid-80's.
- tagrun 8y agoWhat you say has nothing to do with languages and it precedes 80s; Watcom, VC++ etc. comes with a debugger because the proprietary system they run on doesn't have one. GNU/Linux always had 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.
- pjmlp 8y agoThat statement fails on the face of mainframes and commercial UNIX environments, which also have platform debuggers. Also fails regarding other FOSS languages like Python, which have had a debugger since ever.
- tagrun 8y agoWhat fails? Some commercial C/C++ compiler producers invest into a debugger typically because some of their customers use it on a platform without a good built-in debugger. Yes, some systems had debuggers. The point is, some didn't. I said compiled language, which Python isn't. Yes, gdb won't help you debugging scripting/VM languages. Anyway, this is getting off topic, as we're talking about the alleged lack for debuggers for Go binaries for today's Go users, and neither of the things you mentioned are relevant. In my experience, nitpicking rarely leads to anything fruitful.