Hi There,
I have heard that one minor bugbear about Node-RED is debugging. Typical scenario is the missing debug node and having to add it, then having to redeploy and then having to restart the flow. And then nothing happens because the problem seems to have "fixed" itself.
Arising out of a desire to have message tracing, I've put together a dynamic debugger - in was not my intention but it just happened.
What this does is allow dynamic toggling of debug messages (plus message tracing). By dynamic I mean no deploy or flow restart necessary. The animation shows how it works:
Step one is that I turn on message tracing and see in live where messages are flowing. Second step I turn "Msg to Debug" and suddenly all messages that are currently flowing around Node-RED are sent to the debug panel. The debug panel works as expected, just as if the debug node had sent the message.
Notice that the deploy button does not change - there is no need to redeploy or restart the flow, nor to add debug nodes.
Also the difference here to the debug node (which can also be toggled) is that there is no debug node - this is a catch all, debug all feature. It will also debug debug nodes!
Why? Because quite a few people have issues with debugging Node-RED and getting insides into what Node-RED is actually doing - in live.
Either way, this is all available in the introspection package version 0.8.5.
This feature has no overhead (neither client nor server) if not utilised - the hooks and communication are removed when the message tracing is deactivated - the backend has no extra overhead by installing this node package and not activating the message tracing.
DISCLAIMER:
The Node-RED editor can be seriously impeded if there are many messages circulating in Node-RED, use with care else the editor might literally freeze up. This could definitely also happen to the backend since each message is sent over the wire to the client - PLEASE be careful.
If unsure, don't use.