Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Debug Dance - An Intro to Step Debugging - php[tek] 2017

The Debug Dance - An Intro to Step Debugging - php[tek] 2017

This talk was given at php[tek] 2017.

Using `var_dump()` to debug your app has its benefits, but there are more comprehensive and efficient ways to debug those particularly elusive bugs. Enter step debugging. We’ll be using the PhpStorm IDE to step through our PHP apps line by line and see how much more power step debugging gives us over the conventional `var_dump()` technique. We'll also touch on debugging from the command line. Learn to dance in PHP with step debugging.

Code examples: https://github.com/SammyK/debug-dance-php-tek-2017

Sammy Kaye Powers

May 26, 2017
Tweet

More Decks by Sammy Kaye Powers

Other Decks in Programming

Transcript

  1. joind.in/talk/a2b9a @SammyK #phptek Sammy Kaye Powers Dance The May 26th,

    2017 PHP[TEK] 2017 An Intro To Step Debugging in
  2. joind.in/talk/a2b9a @SammyK #phptek Kate Gregory “ I'm not saying, ‘don't

    use printf()’, [...] but I think it's insane to use printf() on day one of learning C++. [...] I would first say use the debugger. Episode 30: Stop Teaching C (When Teaching C++)
  3. joind.in/talk/a2b9a @SammyK #phptek shows the execution path to the point

    where the code was paused Frames I… don’t have a cool drawing for “frames”…
  4. $ brew tap homebrew/homebrew-php $ brew install php71 $ brew

    install php71-xdebug on Homebrew Install +
  5. But wait! I have examples of other setups! & *

    (see me after class for more info)
  6. THANKS! SAMMY KAYE POWERS @SammyK SammyK.me Host of @PHPRoundtable @ChiPHPUG

    West Coast Swing Hire me! :) /talk/a2b9a I have stickers!