[PR Discussion]Debug default node label text

Summary: If no name defined on debug node and only node status is selected - default the node label to "status"

Why:
I use a lot of debug nodes when developing with some set to debug window and some set to status.

But when you switch to status from debug window - the label doesn't change so there are no visual clues as to what the debug node is set to.

And its very useful knowing whether a debug node is feeding the debug window or just is a status when switching them on/off

Obviously, there are many manual workarounds for this but I always like computers to help out automatically where possible :slight_smile:

Simon
[post edited to hopefully make it clearer]

I don't understand what you mean by that. The status shows you what is in the property selected. If you select msg.fred and status then it shows msg.fred as the status. Perhaps I am missing something.

When you deselect debug window and select node status instead, the default node label stays the same (msg.payload)

I'd like it to change to saying "status" instead

Even though you have deselected debug window, the setting for msg.something determines what is shown in the status. If you remove that then you won't (by default) know what is shown in the status. You might just as well say that when debug window is selected and not status then the default name should be debug not msg.payload. The default name tells you what is displayed, the setting for debug window and/or status tells you where it is displayed.

Like the inject node has superscripts after the label to help denote once at start and repeating modes ?

1 Like

You make a fair point

But I've never changed from using msg.payload to msg.something so its not something that's occurred to me

(to be completely honest - I did want to get status of msg.something once and I just added a change node to swap from msg.something to msg.payload before the debug node - I hadn't really noticed that I could change it in the debug node itself)

I'd suggest changing it to (status) msg.payload (or something like that) but I know compatibility is No 1 with any pull request and therefore we wouldn't want to mess up visual look of existing flows by having the debug node getting longer

I wonder if its possible to do a slight color change instead?

Brilliant idea :slight_smile: :slight_smile: :slight_smile: :slight_smile:

So I've playing around with a fork and added some code to add a subscript s onto end if node status only output is selected

What do people think?
image

I've left this subject alone until the change to 0.19 had settled down.

I'm now officially asking if I could go ahead with a pull-request to implement the subscript feature please?

Simon

Yes, but not sure about s being the symbol .... I'd prefer a symbol that indicated something but didn't need possible translation, maybe :leftwards_arrow_with_hook: or ↲ ? or.... plenty to choose from :slight_smile:
Also we don't really want multiple suffix if both to log and to status are selected... in which case imho I'd prefer external to have priority.

My idea is to only show it if only node status is selected (as its to identify when that is the case)

I'm off to find how to stick a ↲ in :slight_smile:

I just had to copy past from here

image

ok ... cut and paste is your friend... :wink:
not insisting on ↲ - just a possible suggestion (to try to indicate the info is appearing just below)... but hey

I don't mind what the symbol is at all :slight_smile:

Just added a space before it to match with console option

image

PR Issued :slight_smile:

Following @knolleary concerns https://github.com/node-red/node-red/pull/1868#issuecomment-416744426 I thought it might be best to bring the discussion back here (if thats OK?)

My reason for wanting a change is so we can easily tell the difference between a debug node that is sending its output to the debug sidebar for analysis and other reasons and one that is just being used as a quick visual indicator of what's happening on the flow in real-time.

In (mine at least) normal developement practice I litter debug nodes all over the place but then disable most/all of the ones sending to the debug side bar and just leave the status ones enabled

To do this, I change the name on the status only ones to "status" (or s if being lazy) but then things go a bit awry if i subsequently make it send it to debug and I end up with a node saying status but its not :frowning:

My original request at the start of this thread was to default the displayed name to status if only status was selected and the name was blank.

@Colin had perfectly valid objection so I'm wondering if it might be a compromise to prefix the label with "status:" (or "s:" or "so:" etc)

I'm aware that adding "status:" status would increase the node length (compared to s: or adding the suffix) so it would effect the visual look of existing flows

Simon

I think the part that I struggle with here is the idea of adding any annotation to the label of a node to tell you it's using node status when the node status itself appears a few pixels below.

I do note that a newly deployed Debug node set to log to node.status does not display any status indicator until a message arrives. Would it help if such a Debug node sent a blank status message on deploy to ensure the status indicator was visible?

1 Like

I slightly(!) radical idea (I can't believe I'm daring to suggest this :slight_smile: ) could be to dynamically change the node icon

image

(I coded this up using the inject.png just as a POC and not as an icon suggestion)

The idea could be used to get rid of all node suffixs in all nodes and lets Node-RED use any graphic it wants to and not just the char based ones

if changing the icon is a step too far - how about changing the colour of the bars?

image

That's not my issue

This issue is telling whether the node is JUST doing node status - as you say - its obvious that it is displaying status info - I just want to easily tell without having to edit node, whether its not sending to debug as well.

Not for me - but its given me the idea of changing colour of the icon?

image

JFI this is my current workaround

image

I'm using a simple Blocky node followed by a normal Debug node
So I can just switch the Debug node on/off but still see status

But it takes it more real estate - the Blockly node has to be recreated/copied on each new Node-RED instance and it can't be switched off without re-deploying (and more processing overhead of course)

Simon