News for hackers. Stuff that matters.
Re:I am a puts debuggerer by lostcolony on Saturday February 06, 2016 @10:06PM (#11051380)
I've noticed that the more stateful my code, the more use I get from a debugger. Being able to poke and prod and see the various values in memory can be extremely helpful when I'm writing in an OO language, that just spitting to console doesn't really do (because I don't know up front what I'm going to care about; what influences what, what values are in the stack, in a containing object, etc).

Conversely, the less state I have (and, typically, the more functional my code), the less useful debugging is. It becomes easier to see my bugs up front (as they have more to do with explicit logic, that is expressed directly in my code), and to trace through in my head what must be going on, and all I need to do is check to confirm my understanding, and that my fix addresses it correctly, which can often be done more easily by just running the code twice (with a puts/print statement), than attaching a debugger twice.

Re:I am a puts debuggerer by girvo on Saturday February 06, 2016 @11:11PM (#11051561)
Yes, this exactly! With OO-based PHP 7 codebases I work on, XDebug with the amazing Codebug client is brilliant. Breakpoint, then poke around the actual data structures within a running request, and see what happens!

When I'm working on functional codebases (our JavaScript is done in a very functional style, and I personally write Clojurescript and Wisp for my personal projects), I find printing the result of function calls completely sufficient, though I suppose one can consider a REPL not that conceptually different from an interactive debugger: in fact, Codebug and I think Komodo's XDebug client actually give you a REPL to play with, set to the context of the given breakpoint

Re:I am a puts debuggerer by rolodato on Sunday February 07, 2016 @12:06AM (#11051715)
I have the exact same experience. Being able to work with a value substitution model is incredibly helpful for mental debugging, just from reading the code. It just tires me to have to track where values are being modified, by who, putting watchers on variables, etc.