Debugging: display all Drupal variables at the bottom of a page
Task · debugging · How to display Drupal variables · Developers and coders · Themers · Drupal 4.5.x or older · Drupal 4.6.x · Drupal 4.7.x · Drupal 5.x · Drupal 6.x · Drupal 7.x
Last modified: August 26, 2009 - 21:57
Introduction
This is a very simple snippet I use to display all the Drupal variables available to a page when I'm testing/debugging a site.
Step 1 of 1
Using a text editor like Pspad or notepad, open up your node.tpl.php file and paste in the following snippet at the bottom of the file.
<?php
print '<pre>';
var_dump(get_defined_vars());
print '</pre>';
?>