Closed ralphwetzel closed 2 years ago
I'm not sure it is correct to remove the onStatus support. The status update not is only for the Node-RED editor. Any Status
node can also receive the updated status. At least that is my understanding.
@ralphwetzel – any further thoughts on this?
Well... closing this PR was not intended.
This done: I've reconsidered some stuff regarding this PR!
First I checked the original code. This lead to two relevant changes.
Additionally, I've re-enabled the functionality to set the status of the DebugNode - based on your comment. To be consistent w/ the standard definitely is mandatory here.
I've kept (with a minor mod) the idea to send the input msg - as it is - back to the editor, to let the standard node process it as required.
We could develop this into a feature to be provided not only to the DebugNode, but as well to other nodes - on request. The concept:
flows.json
is processed.mcu
. This set (object) will be merged into the flows.json
definition of the dedicated node.nodered2mcu
validates these parameters, pre-processes the nodes as requested & then deletes the set from the config.The first feature implemented like this could be - as stated - the functionality to send each msg back to the editor:
The request will be defined via flows.json
. nodered2mcu
processes flows.json
& on request prepends the trace.left
command to the source of onMessage
. Additional features could be added in the future in the same way, when they come up...
Thanks for the updates. This looks good now. I'll merge it.
I've kept (with a minor mod) the idea to send the input msg - as it is - back to the editor, to let the standard node process it as required
That seems good.
We could develop this into a feature to be provided not only to the DebugNode, but as well to other nodes - on request. The concept...
I like the idea of providing better visibly into the runtime through the editor. That's great for debugging. I hesitate to add a very general purpose mechanism without a very specific use. Maybe we should wait until that comes into focus?
This is a small (but capable) change to the DebugNode: It emits the incoming
msg
back to the plugin. Theinput
flag tells the plugin to feed thismsg
into the dedicated node - as if the flow would run in its standard environment.This idea has some limitations - of course.
For the DebugNode it yet offers several advantages:
this.#toStatus
code e.g. is obsolete then.jsonata
asNotImplemented
. It's not present on the MCU - but in the editor. Thus it should be enough to log a compile time info stating this detail.That said, the output of the DebugNode could be further optimized to meet the demands of
xsbug
- without the need to respect NR standard requirements.Additionally I would vote to consider a dedicated communication channel (back to the editor) as alternative to the
trace
interface. There's currently a lot of noise in the sidebar due to all these messages sent...