Debugging with var_dump -> where does the output go?
Usually the var_dump() works but gets hidden below the theme. This is because theme rendering comes last.

I could go into it more, but basically just install Devel and use dpm() for your variable dumps. It prints them in a Drupal-style message. You'll love it.