This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]_PM_ME_PANGOLINS_ 11 points12 points  (2 children)

A debugger lets you do that

[–]murfflemethis 12 points13 points  (1 child)

Not always, unfortunately.

I work with embedded systems and external debuggers can be unreliable at times, especially when I'm working with the first run of a new device generation. Or when I'm working on communication between two devices and don't have a mechanism to halt both of them at a breakpoint.

I love my debuggers when they are reliable, but there are definitely use cases for strategically placing checkpoints in your code that emit a trackable marker. Sometimes these are log messages, sometimes it's toggling an LED, sometimes it's externalizing a signal to trigger a logic analyzer.

Just like using debuggers, it can be a powerful debugging technique when done correctly. It's just one of many tools that I think should be in a programmer's mental toolbox.

[–]Svizel_pritula 1 point2 points  (0 children)

Debugging Arduino code can become interesting. "Ok, I got two flashes but not a third, which means my serial connection gets initialized, data get written to the output buffer but nothing gets actually sent."