You wouldn’t try and work out what’s wrong with your car engine by looking at the front bonnet.. so why debug your application from the outside when you can “pop the hood”?
The xDebug extension for PHP offers some amazing tools for developers to both understand and debug problems in their applications, but is frequently passed over as its benefits, setup, and configuration are poorly understood.
This talk aims to bring xDebug to the masses, discussing the setup of xDebug for a couple of local environments ( currently Local by FlyWheel, Laravel’s Homestead and Laravel’s Valet, though open to including more ‘WordPress’ environments like chassis ) and the configuration of your IDE ( VS Code / PHPStorm). Along with some demonstrations of how this method of working can help everyone take their development to the next level.
Presented by Alex Bishop @aj_adl
21. Echo / Print based debugging
• Only gives us values for chosen variables
• Doesn’t show us the rest of the current scope
• Captures variables at single point in time
24. Step-through debugging
• Stops the execution at a certain (break) point.
• Ability to inspect all variables in current scope
• See current call stack leading to breakpoint
• Advance through the execution to see changes over time