The only thing I've seen that seems genuinely better than print debugging most of the time is the Playground concept, which is just print debugging automatically for every line of your program. Debuggers seem like they are useful sometimes, especially if it takes a lot to get into the state you want to debug, but focusing on making small rapid tests and printing lines that are interesting to you seems to keep me from ever actually bothering to setup delve.
I was initially on the same side. But setting things up is a simple `go get`, and when you want to dive into more complex scenarios, such as concurrency-related bugs, a debugger can save the day!
I'd urge you to give it a spin next time you come across a weird bug ^^
Playgrounds are like a REPL but they are constantly reevaluating your code from the beginning, so you can edit code anywhere in the file and see how it changes everything.
Comments
The only thing I've seen that seems genuinely better than print debugging most of the time is the Playground concept, which is just print debugging automatically for every line of your program. Debuggers seem like they are useful sometimes, especially if it takes a lot to get into the state you want to debug, but focusing on making small rapid tests and printing lines that are interesting to you seems to keep me from ever actually bothering to setup delve.
I was initially on the same side. But setting things up is a simple `go get`, and when you want to dive into more complex scenarios, such as concurrency-related bugs, a debugger can save the day!
I'd urge you to give it a spin next time you come across a weird bug ^^
Like... a REPL?
Playgrounds are like a REPL but they are constantly reevaluating your code from the beginning, so you can edit code anywhere in the file and see how it changes everything.