debugging in php
TRANSCRIPT
Debugging in PHP
Micah Wood @wpscholar
http://wpscholar.com/wcavl2015
Identify the Issue
Steps to Reproduce
Expected Results
Actual Results
Workarounds
Error Messages
Environmental Info
Duplicate the Issue
Isolate the Issue
DetermineType of Issue
DetermineSource of Issue
Debugging
http://xdebug.org/wizard.php
var_dump()
Better var_dump()
Error
Better Error
https://www.jetbrains.com/phpstorm/download/
Setup Bookmarklets
https://www.jetbrains.com/phpstorm/marklets/
Listen for Debug Connections
Pause Code at Breakpoints
Step Through Code Line-by-Line
View Variables in Scope
Watch Variables & Functions
Navigate the Call Stack
https://github.com/Varying-Vagrant-Vagrants/VVV
Enable / Disable Xdebugxdebug_on
xdebug_off
Code Profiling
Fix the Issue
Test the Issue