0

I'm learning about module design for Drupal 7 and I want to see what hook_node_presave is being passed (and working with), how can I output debug info so that I can learn how to manipulate it?

Is there a similar hook that I can use to print out debug info?

1 Answer 1

2

install the devel module and dump your variables with dpm($input, $name = NULL) to the screen.

This article shows additional debugging options.

4
  • 1
    "A suite of modules containing fun for module developers and themers ..." - How can I resist? Thanks!
    – Jane Panda
    Commented Oct 24, 2011 at 20:36
  • Works great, thanks for the reference link, some of the pretty print functions are nice.
    – Jane Panda
    Commented Oct 24, 2011 at 21:00
  • you are very welcome
    – uwe
    Commented Oct 24, 2011 at 21:58
  • The link is broken :( Commented Jul 28, 2017 at 2:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.