function debug node-red code example
Example: node red debug to console
//NODE-RED Show message in debug window
node.warn("msg");
node.error("msg");
//NODE-RED Show message in debug window
node.warn("msg");
node.error("msg");