3

I am trying to wrap my head around the Drupal 7 framework using the debugger in eclipse. The thing is, I'm feeling a little overwhelmed with the endless function calls and watching data bounce back and countless number of times (I'm sure it could actually be counted with more patience).

What is the best way to understand what is going on and get a good overview of how everything fits together? Is using just a debugger the wrong approach?

6

Using a debugger to understand which function called another one is not necessary all the time. If you look at the documentation on api.drupal.org, for example for user_load_by_name(), you will notice the documentation shows the number of functions calling it, which is also a link to a page listing them.

screenshot

In the case of hooks, such as hook_field_info(), the documentation page shows how many functions are implementations of that hook, and the number of functions invoking that hook.

screenshot

The page listing the hook implementations can sometimes include functions that are not hook implementations; the short function description shown in that list makes evident when a function is not really a hook implementation.

screenshot

In some cases, the documentation page lists the functions that reference a function, such as in the case of system_batch_page().

screenshot

The documentation on api.drupal.org includes some sections that describe a group of functions correlated to each other, for example in Batch operations. The list of all the groups is on Topics.

Other topics are linked in the API reference page.

  • Thank you. Your advice is a real help. Its hard to believe how thorough the documentation actually is. – Nate Aug 11 '12 at 23:31
  • 2
    @Nate You might also want to check out the Pro Drupal Development book, it explains how Drupal works from the ground up in very good detail – Clive Aug 11 '12 at 23:34
  • That Pro Drupal Development book is a godsend. I consider myself a pretty seasoned 'Drupaller', but I still find myself going back to it! – Chapabu Aug 12 '12 at 11:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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