I have a lot of different ESP32-based devices, and the memory and processing constraints are both a blessing and a curse. They're a blessing in the sense that they allow for you to make single, purpose-built devices, but they're a curse as when something is going wrong, it's hard to tell whether it's caused by those constraints directly, or the optimizations you had to make being implemented incorrectly. That's why I have a few debugging tools that I always go back to in order to figure out what's going on.

If you do any ESP32 development, or you want to start but aren't sure how to approach a situation where you'll inevitably face difficulties, these tools are simply invaluable.

NinjaTerm

The best web-based all-rounder

NinjaTerm is one of the best tools out there for embedded device development, and can arguably do most of what you'll ever need just from this tool. It's a serial port terminal that works in your web browser or as an installable application, and it has features like logging, graphing, and much more. The web browser version is in maintenance mode, and you'll get additional features when using the installed version. These include:

  • Better performance
  • More advanced features
  • Native tools like logging to disk and better serial port access

On my Mac, for example, I have trouble flashing and accessing serial output from my browser on any given ESP32, yet NinjaTerm's installed version doesn't have any problem with that. On my PC, both versions work just fine, but the installed application is nice to have. When trying to figure out why something isn't working, it can be an incredibly powerful tool, and its logging capabilites are fantastic.

Even better, graphing allows you to actually output data over serial and collect and display it. It's not too difficult to do that yourself normally, but it's nice that it's built in, and you can log that data for graphing yourself later on from the same tool.

MQTT Explorer

For sending and receiving data

If your ESP32 is reporting data to an MQTT server and you don't know if the data is arriving in the way that you'd expect, MQTT Explorer can be an invaluable tool. It's very simple: it's a tool that allows you to connect to your MQTT server and explore topics, reported data, and the settings associated with that data. If your ESP32 is supposed to send data to it, you'll see exactly what's coming in and how the data is formed.

On top of that, it goes the other way, too. If your ESP32 is supposed to respond to data sent to an MQTT server, you can publish data to a topic in order to test if your responses are set up correctly. You can then test with edge cases, and see how it reacts to abnormally large inputs, malformed inputs, or even no inputs at all.

I find myself using MQTT Explorer a lot, and not just for ESP32 development, either. It's just a genuinely useful tool for anyone who uses MQTT in their smart home, as you can keep tabs on communication between devices and services and diagnose the cause of problems with ease.

PlatformIO and Visual Studio Code

I use this just as much as ESPHome

 
Credit:  

PlatformIO is my other go-to development solution for ESP32-based devices, alongside ESPHome. Often, I'll develop a prototype in PlatformIO first, before migrating my code to ESPHome, especially if it's a newer device that may not necessarily work out of the box in ESPHome. It's a fantastic tool for development, as it manages your boards, libraries, and even Espressif SDK versions from one configuration file.

PlatformIO has a number of other tricks over its sleeve that put it above Arduino IDE for development. Not only is it integrated as a part of Visual Studio Code through a plugin, but its built-in OpenOCD (Open On-Chip Debugger) is a significantly better debugger than Arduino's, too. Everything is just an improvement across the board, and while I use Arduino IDE sometimes for basic setups and prototyping, PlatformIO is worth the longer setup for any major project.

This is one of my most used development tools for ESP32 programming, and I highly recommend using it. Its debugging and monitoring capabilities are fantastic, and those are a big part of why I sometimes still use it instead of ESPHome.

There are many others, too

Depending on what you're doing, there are countless other tools that can help you with debugging and testing your ESP32. These can include nRF Connect for debugging BLE, ESP-IDF Monitor for serial, or esptool and functions like read-flash to check if a board is even alive are all tools that can be useful in specific situations, as well. It depends on your needs and what you're building, but at the very least, the three I've mentioned here are ones that are found in practically every single one of my workflows at some point.