Question in debuging a flow - How to stopp node RED in a certain condition?

Hi,

I have some strange effects in my flow (multiple feedback loops) and i cant find out where the message came from, since there are by far too many messages around and the wrong message content happens one of 1000 messages.
By wrong content i mean, my flow sees a message, which should not have come from this point ...

But, in a node function I can see the problem - and I react to it. But I like to know, why this happened. If it would be possible to do a Node.STOPP() or something, which stopps the flow completely I could have a look at the log, I am wirting.

Is there a way?

Kind regards,

lotsbits

Hi @lostbits

Have a look at GitHub - node-red/node-red-debugger: A flow debugger for Node-RED 2.x - this is a plugin for Node-RED that adds debugger tools for your flow.

You can set breakpoints on node inputs and outputs that will pause the runtime when a message arrives at it. You can then examine all of the paused messages.

If you are detecting this 'bad' message in a Function node, you could add an extra output to the Function and use node.send( ... ) to send the message to that new output. That gives you an output to add a breakpoint to.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.