Robert Douglass has another good tip, for when you don't even know what variables are defined at a given scope. Use:
var_dump(get_defined_vars());
When you're de-bugging in Drupal -- or any PHP application, for that matter -- you'll soon learn that print_r is one of your best friends. Soon thereafter, you'll learn that a variable/array/object dumped to the screen is much more readable when you place the output between a pair of <pre> tags. Three simple lines of PHP: