I've got a msg sent to a debug and am trying to put new lines in that message. I've tried "\n" and < br > (without the spaces) but none are working. Is it possible to get new lines in the Debug Messages output window?
guessing here as the topic lacks clear information
Are you trying to inject a string?
As string will no allow newline.
Try injecting json "test\nnewline"
I have a function connected to a debug.
Function says:
msg.payload = "Generator has run out of fuel and been shut down \n"; //shut down generator
msg.payload += "AC loads: " + consumption + "\n";
And it returns msg to the debug module that displays it.
A possible work-around:
const acloads = [123,456]
msg.payload = {
"Generator shut down out of fuel":{
"AC loads":acloads
}
}
return msg;
Gives this, but you do have to keep clicking the little "expand me" triangle.
That's a nice work around, many thanks!