How to add Variables in Drupal (and how to visualize them)?
Are you aware of the devel module? It is typically used in dev versions of a site only, and is not recommended for production status sites.

After you enable that module, you'll get many features, such as dprint_r(), dpm() (I like the last one for debugging). For more details, refer to https://www.drupal.org/node/174575 ...