Debugging Drupal with Xdebug: DrupalCon Portland 2022
Speaker: Nick Dickinson-Wilde
Xdebug is a PHP extension that can massively improve your debugging experience and speed – for both backend and frontend developers. Conversely, it can also significantly slow down your php execution speed, so you want to only enable when you are using it. Xdebug works with most IDEs but I will be specifically showcasing usage with PHPStorm & VSCode.
Given certain history of statements in the PHP community, I do want to emphasize something; Xdebug usage is unrelated to seniority or development expertise.
Xdebug is a great tool - and way faster for me than most other methods in most situations. However there are definitelly situations that other debugging methods will be better Having Xxebug in your box of personal tools doesn't mean you have to switch everything, it is just another tool that you can use.
There are cases that Xdebug really excels compared to other options – such as building migrations, or other processes that run through the same code paths many times with slightly different variables.
Additionally, Xdebug can debug twig and let you explore available variables without worrying about memory. This use case is often a significant speed improvement over kint() or other variable dumping methods that may show incomplete data to get around memory limits.
After basic installation/configuration, we will debug a spreadsheet to Drupal migration for a bit of real world usage.
Xdebug is a PHP extension that can massively improve your debugging experience and speed – for both backend and frontend developers. Conversely, it can also significantly slow down your php execution speed, so you want to only enable when you are using it. Xdebug works with most IDEs but I will be specifically showcasing usage with PHPStorm & VSCode.
Given certain history of statements in the PHP community, I do want to emphasize something; Xdebug usage is unrelated to seniority or development expertise.
Xdebug is a great tool - and way faster for me than most other methods in most situations. However there are definitelly situations that other debugging methods will be better Having Xxebug in your box of personal tools doesn't mean you have to switch everything, it is just another tool that you can use.
There are cases that Xdebug really excels compared to other options – such as building migrations, or other processes that run through the same code paths many times with slightly different variables.
Additionally, Xdebug can debug twig and let you explore available variables without worrying about memory. This use case is often a significant speed improvement over kint() or other variable dumping methods that may show incomplete data to get around memory limits.
After basic installation/configuration, we will debug a spreadsheet to Drupal migration for a bit of real world usage.