Printing to the Node-Red debug-sidebar

I was looking for ways to print to the Node-Red debug-sidebar from a Function Node. I came across node.warn() and node.error(); they both print messages to the debug-sidebar, highlighted in yellow and red respectively. In the drop-down list of "node." options there doesn't appear to be a general print option (either without highlighting, or some none threatening color like green). I read about a possible undocumented option "node.debug", but that doesn't seem to work.

While using the.warn, or .error options will serve the purpose; does anyone know of a general option for "node." printing to the debug-sidebar?

You can use .warn to do this., which will give you all the values and functions of node.


[edit] Did not fully read question.

If you want no color highlight you can use node.send() at any time you wish in your code, but you have to send an object.
If you use node.send([null, {object}]) you could send it to a second output of function node.

Thanks, but quite frankly that seems too complicated just to message; I'll stick with .warn & .error, actually the color helps draw attention to the messages. I'm just surprised that there isn't a general massaging method perhaps with a color option parameter. I would have thought the .debug would be the one to direct to the Debug-sidebar, and green would match the color of the Debug-node. Ah well, such is life. :upside_down_face:

You can always make a feature request for colour option on node,wan() or something similar.

just tag the topic feature request and describe what you think is a good idea.

I think it is key to understand what exactly you are looking for: It is a debug window - for debugging.

You can configure the debug nodes to output specific data, name them and you can find it more easily in the debug window, next when hovering over the output messages the originating debug node is highlighted and to top it all off you can filter the debug window to show only show output from specific nodes, from a single flow or all flows.

In addition you can use node.status to show a status underneath the node.

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