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.

with


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

  • 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

Logging

  • 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

Resources

Derick Rethans


Colin O'Dell


Gary Hockin


Developer Shout-Out

The Developer Shout-Out recognizes developers in the community for their contributions.

For this episode the panel guests, Derick, Colin, and Gary nominated Remi Collet for the Developer Shout-Out segment.

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

$50 Amazon gift card sponsored by Laracasts

Laracasts

It's like Netflix for developers.

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!