Thanks, I’ll have to try it. Up to now I've debug my functions by adding a debug. This is my example function showing how it works:
// add this to the top of your function node then any where you want
// to see an item use: debug("01", "this is text to show")
var debugStatus = true; // set this to 'false' to shut off the debug messages
function debug(debug_id, debug_value) {
if (!debugStatus) {return;} // if debug is
var debugMsg = "debug-" + debug_id + ": " + JSON.stringify(debug_value);
node.warn(debugMsg);
}
// the following are examples of how you can use it. I use unique numbers for the ID
// so I can locate them in the code, but you can use anything
debug(01,"This is a text string");
var requiredInputs = {"start": "start","stop": "stop"};
debug("inline",requiredInputs);
var xx = 33;
debug("in if", xx);
debug("value",34.7);
debug(2, "the temp is:" + 34.7);
debug(99, "msg.payload:" + msg.payload);
return null;