Re:Comparing Pythagorean triples in C++, D, and Rust
by WalterBright on Monday December 31, 2018 @04:57PM
(#18797302)
I used to build/program embedded systems (around a 6800 uP). I'd debug using an oscilloscope, sometimes an LED attached to a pin, sometimes connecting the pin to a speaker (!). There wasn't enough EPROM space for a printf. And besides, the turnaround time for erasing/blowing an EPROM was just too long.
Essentially you just get good at staring at the code and running gedanken experiments till you figure it out.
Re:Comparing Pythagorean triples in C++, D, and Rust
by burntsushi on Monday December 31, 2018 @02:37PM
(#18796441)
Why is it funny? And why do you not consider printf to be "actual" debugging? I mean, if printf wasn't available to me or was for some reason otherwise inconvenient, then I would look for other avenues to debug, perhaps by using a debugger! This isn't that mystifying.
As I said above, this is very heavily dependent on preferred workflows and what you're working on. Long ago, I remember doing some robotics work in C, and a debugger was invaluable.
Maybe it's a software vs hardware thing, but I would end it all if I had to work hardware without breakpoints, watches, and step-through.