Use the debugging functions to print out the tree and resources.