The debug window shows the id of the
debug node that produced the output, except when it's inside a subflow. In this case it shows the id of the subflow instance (the calling node).
node.id returns the id of the node. If the function is inside a subflow, it would be useful to be able to return the id of the calling node. Along the lines of
parent was only non-null for subflows. Logically it would also extend to
node.parent.parent.id for subflows within subflows. Note that this is different to using the
$parent context, which is at the flow level.
My use case is for logging within a subflow that is used in multiple flows, to know which node called the subflow. I have many flows and each calls the subflow many times, so using
$parent.name doesn't give me enough information and
$parent.id doesn't exist (and would logically be the flow id anyway).