A minimalists intro to XDEBUG
Claudio Mettler, CtrlM Singapore
August 2015
1
Slide 2
Slide 2 text
xdebug...
• ...provides new functions useful for debugging,
logging and testing
• ...changes the behaviour of some core PHP
functionality
• ...does profiling
• ...implements a remote debugging protocol
2
Slide 3
Slide 3 text
A word of caution
• do not run on live servers (for performance and
security reasons)
• may cause extreme twitchiness when watching
people debug without a debugger
3
Slide 4
Slide 4 text
new functions
• code coverage analysis
• xdebug_call_class(), xdebug_call_file(),
xdebug_call_function(), xdebug_get_headers()
• etc.
4
Slide 5
Slide 5 text
Modified behaviour
• includes a stack trace in error messages
• var_dump can do colors now
• function nesting limit of 100!
• etc.
5
Slide 6
Slide 6 text
6
Slide 7
Slide 7 text
7
Slide 8
Slide 8 text
profiling
• creates CacheGrind files
• topic for another talk
8