Better debugging

The current debugging capability of Node-Red leaves a lot to be desired. While there are plans to improve it, these will take some time to complete.

In the meantime, I've created an alternative that is fairly easy for anyone to implement and seems to work well. I'm now using it in my projects.

The approach is to create a subflow that outputs a msg to MQTT instead of debug. Then to create a flow that creates a debug web page that receives the MQTT debug messages. The page creates a section for each message TOPIC so it is important to set that correctly before sending the msg to the subflow. Then each topic shows a formatted display of the full msg object. The topic display is updated each time a message with the same topic is sent out. A timestamp is included to show when each topic was last updated.

As there is both a flow and a subflow & some example images, I've put the example on github.

Although labelled an example, it is fully working and can be simply added to your own instance and should work straight away. Please leave any issues and comments in the github issues list.

Note the dependencies. The main dependency is an implementation of a MQTT broker with websockets support. You should be able to use Mosca but I've tested this with Mosquitto 1.4 compiled with websockets support.


Flow Info

Created 8 years, 5 months ago
Updated 8 years ago
Rating: not yet rated



Node Types


  • debug
  • mqtt
  • live-updates
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option