You probably have heard that Xdebug is what you should be using to help debug your backend. Now you've done it. You've gone through the various setup blogs, and now, Congratulations you have successfully setup Xdebug with your IDE. Now what?
Many of the tutorials I've seen stop at, You've finished setup, now go debug. In a project as complex as Drupal where should I start? At Node::save(), a form_preprocess(), somewhere in the depths of core or that well known contrib module? What is all this stuff and which do I care about? Many of the answers are dynamic, where time and experience being the answer. Information overload is super easy at this point. My hope is to help developers who are ready to sail down the Xdebug river navigate so they don't feel like they're taking on Niagara Falls in a barrel.
In a live demo, I will go through some xdebugging basics using PhpStorm. The objects, arrays and variables seen will still be used/found with any debugging via IDEs, print_r(), var_dump(), ksm() or debug(). I will walk through preprocess_node() and hook_form_alter(). Then if there's time take questions or continue through hook_entity_presave().
This is best for people who:
- Haven't dug into xdebug or debugging,
- Beginning module developers or contributors,
- Want a quick evaluation/demo of PhpStorm and Xdebug,
- Interested in PHP code and Drupal backend,
- Manipulate mytheme.theme.