A Usable Arduino Debugging Tool

For as popular as the Arduino platform is, it’s not without its problems. Among those is the fact that most practical debugging is often done by placing various print statements throughout the code and watching for them in the serial monitor. There’s not really a great way of placing breakpoints or stepping through code, either. But this project, known as eye2see, hopes to change that by using the i2c bus found in most Arduinos to provide a more robust set of debugging tools.

The eye2see software is set up to run on an Arduino or other compatible microcontroller, called the “probe”, which is connected to the i2c bus on another Arduino whose code needs to be debugged. Code running on this Arduino, which is part of the eye2see library, allows it to send debugging information to the eye2see probe. With a screen, the probe can act as a much more powerful debugger than would otherwise typically be available, being able to keep track of variables in the main program, setting up breakpoints, and outputting various messages on its screen.

The tool is not without its downsides, though. The library that needs to run on the host Arduino slows down the original program significantly. But for more complex programs, the tradeoff with powerful debugging tools may be worth it until these pieces of code can be removed and the program allowed to run unencumbered. If you’d like to skip needing to use a second Arduino, we’ve seen some other tools available for debugging Arduino code that can run straight from a connected PC instead.

16 thoughts on “A Usable Arduino Debugging Tool

    1. This. I really don’t like when people conflate Arduino with Atmega or more broadly AVR architecture when most of current Arduino boards does not even have AVR MCU.

      1. The name was originally Inter Integrated Cicuit, hence IIC, Hence I2C – I squared C – I’m not saying it’s ‘right’ whatever that would mean in this context, but that’s the ‘history’. I’m doing that based on my memory, but it also is what Wikipedia says, so it must be right! (sarcasm intended)

    1. Speaking of mispronunciation, shouldn’t the title read “An usable Arduino debugging tool” ?
      In English class I learned that the “n” is added, if the following word starts with a vowel (a, e, i, o, u). That way, the tongue doesn’t break.

      1. No, because “usable” is pronounced like “jusable” in English, meaning that it effectively starts with a consonant. Conversely, the correct form is “an hour”, not “a hour”, because the H is silent.

  1. There is no replacement for SWD or full JTAG. I like breakpoints, SWO Trace. I even use printf from time to time. But any code that does more than blink an led needs to be debugged every so often. So bring in the breakpoints and relax.

  2. yeah i’d rather not use avr today, when stm32 and rp2040 sort of things are so powerful, especially with SWD. even without SWD, the rp2040 usb bootloader makes it super convenient to just inspect whatever was in memory at the last reset, if you are willing to accept a sort of watchdog-driven development cycle. the world’s cheapest ‘printf debugging’

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.