4 ms·
I use a debugger mainly as a way of inspecting values without printf everywhere. I put a break at a place where I suspect something is going wrong, and inspect
by ori_b 18y ago
I use a debugger mainly as a way of inspecting values without printf everywhere.
I put a break at a place where I suspect something is going wrong, and inspect the state of the program; I could simulate the same thing with printf, but that takes recompiling and trial-and-error.
A debugger saves me a great deal of time. Especially with DDD's way of stepping through data structures.
- tezza 18y agoAgreed. A lot of the article seems just like a restatement of KISS. * Using a Debugger is like a first pass sweep of where to put the juiciest printfs. It cuts down the problem space. * If you're doing OOP and different components are calling back in at different points, a breakpoint can be quite illuminating. printf will clog your short term memory with trivialities. * A Debugger has deep structure support built in, no coding a recursive node walk printout for each datatype.