[powerdebug 19/23] add a tree function to return a list of elements