The PHP podcast where everyone chimes in.

Originally aired on

November 16th, 2015

034: Debugging is more than var_dump()

Believe it or not, there's a lot more to debugging your PHP code than var_dump()'ing all the things. We discuss how to use debugging tools to help us comprehensively debug our codebase.


Debugging is more than var_dump() Show Summary

Debugging Attitudes

  • Developers sometimes assume that their code was written properly
  • Instead, you should verify that your code works


  • var_dump() is still a valid way of debugging
  • Xdebug and similar things can make var_dump() prettier
  • If you are using var_dump() to the point that you need to make it look pretty, you should us a step debugger


  • Log interesting things, but don't go overboard
  • Include useful information, like IDs
  • Events should have the option for logging to be enabled

Step Debugging

  • Xdebug helps for step debugging amongst other things
  • Step debugging allows you to pause a program at certain lines
  • They are very good for debugging someone else's code

Future of Debugging

  • Debugging that allows you to view the history of a variable


Developer Shout-Out

Thank you, Remi Collet for maintaining packages & testing RC's for PHP. A $50 Amazon gift card from Laracasts is on its way to you.

Shout-out sponsored by Laracasts


It's like Netflix for developers.


Derick Rethans

Colin O'Dell

Gary Hockin

Show Notes Credit

Thank you Peter Keller for authoring the show notes for this episode!

If you'd like to contribute show notes and totally get credit for it, check out the show-notes repo!