Richard Fabo's Sad-tf Wants to Make Your Arduino Debugging Happier

Designed to be easier to use than more expansive tools, Sad-tf delivers something better than a "couple of Serial.print() commands."

Gareth Halfacree
19 days agoDebugging / Productivity

Developer Richard Fabo is looking to make Arduino developers happy, by giving them Sad-tf — the Simple Arduino Debugger, designed to ease basic debugging over a serial connection.

"As we all know - debugging most well-known AVR boards is not (so [easily]) possible with any debugger," Fabo explains, "[so] most of us are using just [a] couple of Serial.print() commands. Well, it works, but it’s not very convenient. So I made a small library, which can be included into existing code and which allows to set breakpoints, read (show) variables and modify them using any serial terminal (like included Serial Monitor in Arduino IDE, CuteCom, Emacs' serial-term, or simply by command cu)."

Sad-tf, the Simple Arduino Debugger, isn't trying to be a comprehensive debugging tool; instead, it's simply trying to provide something that's better than throwing a bunch of manual print statements at important points of a problem. Once included, the library allows for the easy creation of a range of breakpoints — capable of reading or modifying int, byte, and long variants, and of stopping execution if a certain condition is met.

"When the breakpoint is activated," Fabo explains, "the serial console inform[s] about this." When it does, Sad-tf switches into an interactive mode — allowing the user to list variables, change variables, and force the program to proceed to the next breakpoint.

"Well, [it's] not [rocket] science," Fabo admits, "but it's quite useful for me. Newer Arduinos or [Espressif] ESPs can be debugged using hardware debugger (also 'classic' Arduino can be, using JTAG, but is it worth the effort?), but I am still using [Arduino] Megas and Leonardos a lot, in Arduino-based PLCs [Programmable Logic Controllers]."

The library is now available on GitLab, under the reciprocal GNU General Public License 3.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles