Good work r-a-y, this is great thanks!
I hope you don't mind but I've slightly adapted this into a WordPress plugin that adds the info to the admin menu. I'd like to extend it a bit in the future too, but it means that it doesn't interfere with the front-end UI as your code means that it overlays on the website, stopping me clicking on buttons and things sometimes (I also only show to admin level users).
Check out the work in progress at https://github.com/TancDesign/Tanc-BuddyPress-Helper
Sorry everyone for not replying! I don't get notified of gist comments!
@Jonnyauk - Good job on extending the codebase of this debug plugin. I just added a check so only admins can view the debug output.
@iheartwine - This is a debug plugin for theme developers. This is not meant to be included into a theme.