Random Nerd Tutorials

Better Debugging for Arduino IDE: SerialDebugApp (Part 3)

This tutorial was written by João Lopes and edited by Sara Santos.

The SerialDebug library created by João Lopes allows you to improve debugging for Arduino IDE. In this article he’ll show you how to use the SerialDebugAp, companion app of the SerialDebug library.

This is part 3 of a series of articles about the SerialDebug library. You can check all the articles on the links below.

Introducing the SerialDebugApp

The SerialDebugApp aims to bring better debugging to Arduino IDE.

This app has some improvements to replace the standard Serial Monitor:

  • Shows debug messages with different colors, depending on each level.
  • It comes with buttons for most commands of SerialDebug software.
  • It allows you to set themes, light and dark themes.
  • Auto-disconnect feature. If you leave the app, e.g Cmd-Tab/Alt-Tab to switch to Arduino IDE, the app will disconnect from serial port to allow a new upload.
  • Other features like filter, converter, etc.

Installing the SerialDebugApp

Go to this page to download the SerialDebugApp. Here’s three types of installers you can download:

  • Windows: it’s a MSI installer. Just download the file, unzip it and run the installer. This installer creates a shortcut on desktop and in menu too.
  • Linux: doesn’t have an installer (due to issues on JavaPackager). For now, please download and use the jar file (read note below).
  • MacOSX: it’s a PKG installer. Just download, unzip and run this installer. This installer will create app in MacOSX Applications – for this, you need superuser login.

Note: there is also a Java jar executable (needs Java runtime). It runs in MS Windows, Linux, MacOSX and other OS supported by Java. It’s not an installer,it is an executable jar. Just unzip, copy to any directory and run.

Running the SerialDebugApp

To run the the SerialDebugApp:

  • Windows: click the SerialDebugApp shortcut in the desktop or in the start menu.
  • Linux or Java jar executable installed: open the Java jar executable file “SerialDebugApp.jar”.
  • MacOSX: Just click in SerialDebugApp in the Applications folder.

Note: in each run, the app checks if there are any updates.

Changing the theme


SerialDebugApp has light and dark themes. You can set one theme to UI and another to the serial console. To change the theme, go to the Settings menu:

After making the changes, press Apply or Ok:

Keyboard Shortcuts

Before connecting, the SerialDebugApp shows a list of commands:

Keyboard shortcuts:

  • Cmd-K – Connect/disconnect on selected serial port and speed
  • Cmd-R – Refresh serial port list
  • Cmd-E – Erase (clear serial screen)
  • Cmd-F – Find
  • Cmd-G – Next find
  • Cmd-C – Copy to clipboard

If board program is with SerialDebug library:

  • Cmd-0 – Silence on/off (no outputs)
  • Cmd-1 – Set debug level to V-verbose
  • Cmd-2 – Set debug level to D-debug
  • Cmd-3 – Set debug level to I-info
  • Cmd-4 – Set debug level to W-earning
  • Cmd-5 – Set debug level to E-error
  • Cmd-6 – Set debug level to N-none (no debug outputs)
  • Cmd-7 – Toggle simple software debugger on/off
  • Cmd-8 – To nonstop on watches

Note: in this example, the app is running in MacOSX, the shortcuts are with Command/Cmd key. If you’re using Windows or Linux, use Control/Ctrl key.

Connecting to a Serial Port

To connect to a serial port, just select the port in the list of available ports. If the port is not listed yet, click in “Refresh” to refresh the list.

Select the speed in the bauds list below the port name.

Note: the default speed in examples of SerialDebug is 115200 for Uno and 250000 for others. You can use any speed, just select it or write the baud rate.

Now, press “Connect“, or Cmd-K/Control-K.

After connecting, the app will check if the version of library running in the board is the latest. In this case, the app allows access to the GitHub page to do a fresh download. Alternatively, you can use the library manager to update.

Note: with the SerialDebugApp, after a successful connection, the SerialDebug library leaves the inactive mode and the debug messages start showing.

Explaining the UI of SerialDebugApp

The following figure highlights some of the sections of the SerialDebugApp.

How to use SerialDebugApp taskbar:

  • Auto scroll: turns on/off the auto scroll of serial console.
  • Silence: it turns on/off silence mode, where no debug output is generated.
  • Debugger: it turns on/off the simple software debugger.
  • Verbose, Debug, Info, Warning, Error and None: it sets the actual debug level.
  • Help: lists SerialDebug commands.
  • Continue: use it to continue if SerialDebug is in break.
  • Reset: reset the microcontroller.
    Note: at the time of writing, this is not implemented for all microcontrollers that support Arduino code.
  • Send: send data or commands to serial port.
  • Find: find text/data received in serial console.
  • Filter/Clear: filter displayed data (and clear to restore without filter).
    Note: this only applies to debug messages (watches will not be filtered).
  • A+/A-: increase/decrease serial console’s font size.
    Note: to change the font size permanently, go to the Settings menu.
  • Clear: clear serial console.
  • Clipboard/Save: send all received data to clipboard or file.
  • Settings: show the app settings.

Enabling the Debugger

Press the “Debugger” button or Cmd-7/Ctrl-7, to enable the simple software debugger. The app shows the debugger elements on screen, as shown in the following figure:

The app highlights global variables whose value have changed, or watches recently triggered. These are shown in yellow and have a fade out effect, as time goes by.

At the SerialDebugApp taskbar, new buttons show up:

  • W.nonstop/W.stop: turns on/off the stop for watches.

Note: the nonstop can be done automatically in the Settings.

SerialDebugApp Video Demonstration

Watch the following videos that show the SerialDebug App in action, so that you better understand how it works and how to use it:

Wrapping Up

This is the last post of this 3 part series about the SerialDebug library and the SerialDebug App. Here are the links for all the tutorials:

I hope you’ve found these tutorials useful.

Help me bring a better debug to the Arduino IDE using this library. Visit the GitHub page https://github.com/JoaoLopesF/SerialDebug, for more information, post issues and suggestions. Also, you can use the gitter chat room to share your feedback.

Thanks to Random Nerd Tutorials for the possibility of doing a post about SerialDebug library.

João Lopes

Random Nerd Tutorials has more than 200 free electronics projects and tutorials. Check them all in the next link: 200+ Electronics Projects and Tutorials

Learn ESP32 with Arduino IDE

This is our complete guide to program the ESP32 with Arduino IDE, including projects, tips, and tricks! The registrations are open, so SIGN UP NOW »

Recommended Resources

Home Automation using ESP8266 »
Build IoT projects and home automation gadgets with the ESP8266 Wi-Fi module.

Build a Home Automation System »
Learn how to build a automation system using open-source hardware and software from scratch.

Arduino Step-by-Step Projects »
Build 25 cool Arduino projects with our course even with no prior experience!

Leave a Comment:

Add Your Reply

Enroll in our Electronics and Programming Courses:

ESP32, ESP8266, Arduino and much more.