On 27 June 2014 11:16, Nick Sabalausky via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > On 6/26/2014 7:24 PM, H. S. Teoh via Digitalmars-d wrote: >> >> On Thu, Jun 26, 2014 at 10:57:28PM +0000, Sean Kelly via Digitalmars-d >> wrote: >>> >>> On Thursday, 19 June 2014 at 05:35:06 UTC, Nick Sabalausky wrote: >>>> >>>> >>>> That's why I inadvertently learned to love printf debugging. I get to >>>> see the whole "chart" at one. >>> >>> >>> Yep. A lot of this is probably because as a server programmer >>> I've just gotten used to finding bugs this way as a matter of >>> necessity, but in many cases I actually prefer it to interactive >>> debugging. For example, build core.demangle with -debug=trace >>> and -debug=info set. >> >> >> Over the years, I've come to prefer printf debugging too. >> >> At my job I work with headless embedded systems, and interactive >> debugging can only be done remotely. > > > Aye. Sometimes in embedded work, you're *lucky* if you can even do printf at > all, let alone a debugger. I've had to debug with as little as one LED. > It's...umm..."interesting". And time consuming. Especially when it's ASM. > (But somewhat of a proud-yet-twisted rite of passage though ;) ) > > There's other times I've had to get by without debuggers too. Like, in the > earlier days of web dev, it was common to not have a debugger. Or debugging > JS problems that only manifested on Safari (I assume Safari probably has JS > diagnostics/debugging now, but it didn't always. That was a pain.)
Aye, I wrote my former company's PSP engine with nothing more than the unit's power light as a debugging tool (at least until I managed to initialise the display hardware and render something). I would while(1) around the place... if it reached that point, the power light stayed on. If it crashed before it reached that point, the power light went off (after a 20 second delay, which made every single execution a suspenseful experience!).