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.
Asked
Active
Viewed 1.7k times
12
-
Why do you not want to use a debug node? – hardillb Mar 03 '16 at 09:21
1 Answers
15
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;
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

hardillb
- 54,545
- 11
- 67
- 105
-
Once a `node.error()` is invoked, should it be followed with a `return null` statement to halt the flow? Or, will that happen on its own? – cogitoergosum Jul 03 '18 at 02:25
-
-
-
-
1@Xdg There is a `node.debug()` but it is not for sending items to the sidebar. https://nodered.org/docs/user-guide/writing-functions#logging-events – hardillb Nov 18 '21 at 11:33