debugging in php

32
Debugging in PHP Micah Wood @wpscholar http://wpscholar.com/wcavl2015

Upload: micah-wood

Post on 12-Aug-2015

161 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Debugging in PHP

Debugging in PHP

Micah Wood @wpscholar

http://wpscholar.com/wcavl2015

Page 2: Debugging in PHP

Identify the Issue

Page 3: Debugging in PHP

Steps to Reproduce

Page 4: Debugging in PHP

Expected Results

Page 5: Debugging in PHP

Actual Results

Page 6: Debugging in PHP

Workarounds

Page 7: Debugging in PHP

Error Messages

Page 8: Debugging in PHP

Environmental Info

Page 9: Debugging in PHP

Duplicate the Issue

Page 10: Debugging in PHP

Isolate the Issue

Page 11: Debugging in PHP

DetermineType of Issue

Page 12: Debugging in PHP

DetermineSource of Issue

Page 13: Debugging in PHP

Debugging

Page 14: Debugging in PHP

http://xdebug.org/wizard.php

Page 15: Debugging in PHP

var_dump()

Page 16: Debugging in PHP

Better var_dump()

Page 17: Debugging in PHP

Error

Page 18: Debugging in PHP

Better Error

Page 19: Debugging in PHP

https://www.jetbrains.com/phpstorm/download/

Page 20: Debugging in PHP

Setup Bookmarklets

https://www.jetbrains.com/phpstorm/marklets/

Page 21: Debugging in PHP

Listen for Debug Connections

Page 22: Debugging in PHP

Pause Code at Breakpoints

Page 23: Debugging in PHP

Step Through Code Line-by-Line

Page 24: Debugging in PHP

View Variables in Scope

Page 25: Debugging in PHP

Watch Variables & Functions

Page 26: Debugging in PHP

Navigate the Call Stack

Page 27: Debugging in PHP

https://github.com/Varying-Vagrant-Vagrants/VVV

Page 28: Debugging in PHP

Enable / Disable Xdebugxdebug_on

xdebug_off

Page 29: Debugging in PHP

Code Profiling

Page 30: Debugging in PHP

Fix the Issue

Page 31: Debugging in PHP

Test the Issue

Page 32: Debugging in PHP

Questions?

Micah Wood @wpscholar

http://wpscholar.com/wcavl2015