Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In node-red how can I send a message to the debug tab with out using debug node? Is there method I could call

Tags:

node-red

Node-RED flow

I dont want use debug node. rather I want to just pass the debug message to the debug tab directly from my customized node. So I was wondering if may be there is a method that I could use to achieve this.

like image 424
ramnath teja chekka Avatar asked Mar 03 '16 09:03

ramnath teja chekka


1 Answers

The node object is exposed in the context of a function node and had 2 functions that will add something to the debug tab

node.warn() and node.error() both print to the debug tab (and also to the console) but with suitable colours and header messages e.g.

node.warn(msg.payload);
return msg;

warn and error messages in debug tab

Be aware that node.error will also raise a message that can be caught by the Catch node so if you just want to report status from with in a function then the node.warn is probably best

like image 97
hardillb Avatar answered Oct 15 '22 06:10

hardillb