SlideShare a Scribd company logo
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
Determine

Type of Issue
Determine

Source 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 Xdebug
xdebug_on
xdebug_off
Code Profiling
Fix the Issue
Test the Issue
Questions?
Micah Wood
@wpscholar
http://wpscholar.com/wcavl2015

More Related Content

PPTX
Getting Started with Vagrant
PDF
Web pack and friends
PDF
Firefox OS something 201411
PPTX
It Works On Dev
PPTX
Unit tests with vagrant
PPT
Vagrant
KEY
Hello Cats: MobileWidgetCamp talk about mobile widgets
PPTX
The GiveCamp Guide to WordPress
Getting Started with Vagrant
Web pack and friends
Firefox OS something 201411
It Works On Dev
Unit tests with vagrant
Vagrant
Hello Cats: MobileWidgetCamp talk about mobile widgets
The GiveCamp Guide to WordPress

What's hot (12)

PPTX
Taking Web Applications Offline
PPTX
Desktop, Web e Mobile
PPTX
Varying vagrant vagrants
PPTX
Xdebug, KCacheGrind and Webgrind with WampServer
PPTX
C++ development with visual studio code
PDF
Jakarta WordPress Meetup #9: Introducing VVV 2
PPTX
Automated dependency updates
PDF
Vagrant: Your Personal Cloud
PDF
JavaScript and Web Standards - The Subliminal Messaging edition
PPTX
In the desert, without a camel
PDF
Create connected home devices using a Raspberry Pi, Siri and ESPNow for makers.
Taking Web Applications Offline
Desktop, Web e Mobile
Varying vagrant vagrants
Xdebug, KCacheGrind and Webgrind with WampServer
C++ development with visual studio code
Jakarta WordPress Meetup #9: Introducing VVV 2
Automated dependency updates
Vagrant: Your Personal Cloud
JavaScript and Web Standards - The Subliminal Messaging edition
In the desert, without a camel
Create connected home devices using a Raspberry Pi, Siri and ESPNow for makers.
Ad

Viewers also liked (8)

PDF
Using Composer with WordPress
PDF
Advanced Development Workflows
PDF
Shortcodes In-Depth
PDF
Sanitizing, Validating and Escaping in WordPress Themes and Plugins
PDF
Troubleshooting WordPress Issues
PDF
Profiling PHP with Xdebug / Webgrind
PDF
Debugging Drupal - How to Debug your Drupal Application
PDF
Debugging PHP With Xdebug
Using Composer with WordPress
Advanced Development Workflows
Shortcodes In-Depth
Sanitizing, Validating and Escaping in WordPress Themes and Plugins
Troubleshooting WordPress Issues
Profiling PHP with Xdebug / Webgrind
Debugging Drupal - How to Debug your Drupal Application
Debugging PHP With Xdebug
Ad

Similar to Debugging in PHP (20)

PDF
Debugging in PHP
PPTX
Lightning Talk: JavaScript Error Handling
ODP
Passing The Joel Test In The PHP World
PPTX
nullcon 2011 - Reversing MicroSoft patches to reveal vulnerable code
PPTX
FaultHunter workshop (SourceMeter for SonarQube plugin module)
DOCX
Exception handling
PDF
Diagnosing WordPress: What to do when things go wrong
PDF
Review unknown code with static analysis - bredaphp
PPT
.NET Debugging Tips and Techniques
PPT
.Net Debugging Techniques
PDF
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
PPTX
Le Tour de xUnit
PDF
Living With Legacy Code
PDF
Php exceptions
PPTX
Xdebug
PPT
PHPUnit Automated Unit Testing Framework
PPTX
Getting started with WordPress development
ODP
JavaOne 2009 BOF-5189 Griffon In Depth
PPT
Exception Handling Java
PDF
10 Ways To Improve Your Code
Debugging in PHP
Lightning Talk: JavaScript Error Handling
Passing The Joel Test In The PHP World
nullcon 2011 - Reversing MicroSoft patches to reveal vulnerable code
FaultHunter workshop (SourceMeter for SonarQube plugin module)
Exception handling
Diagnosing WordPress: What to do when things go wrong
Review unknown code with static analysis - bredaphp
.NET Debugging Tips and Techniques
.Net Debugging Techniques
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
Le Tour de xUnit
Living With Legacy Code
Php exceptions
Xdebug
PHPUnit Automated Unit Testing Framework
Getting started with WordPress development
JavaOne 2009 BOF-5189 Griffon In Depth
Exception Handling Java
10 Ways To Improve Your Code

More from Micah Wood (11)

PPTX
Introduction to JSX
PDF
WP-CLI For The Win
PDF
Using Chrome Dev Tools
PDF
Becoming a WordPress Coding Master
PDF
WordPress Hooks
PDF
The Modern JavaScript Developers Toolbox
PDF
An Introduction to PHP Classes
PDF
Backbone + React
PDF
Testing Made Easy
PDF
Using Composer with WordPress - 2.0
PDF
Using composer with WordPress
Introduction to JSX
WP-CLI For The Win
Using Chrome Dev Tools
Becoming a WordPress Coding Master
WordPress Hooks
The Modern JavaScript Developers Toolbox
An Introduction to PHP Classes
Backbone + React
Testing Made Easy
Using Composer with WordPress - 2.0
Using composer with WordPress

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Unlocking AI with Model Context Protocol (MCP)
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
sap open course for s4hana steps from ECC to s4
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Electronic commerce courselecture one. Pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Approach and Philosophy of On baking technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
A comparative analysis of optical character recognition models for extracting...
Dropbox Q2 2025 Financial Results & Investor Presentation
Unlocking AI with Model Context Protocol (MCP)
“AI and Expert System Decision Support & Business Intelligence Systems”
MYSQL Presentation for SQL database connectivity
sap open course for s4hana steps from ECC to s4
The AUB Centre for AI in Media Proposal.docx
Assigned Numbers - 2025 - Bluetooth® Document
Building Integrated photovoltaic BIPV_UPV.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Electronic commerce courselecture one. Pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The Rise and Fall of 3GPP – Time for a Sabbatical?
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11