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

8c090cc1ccd623a146ddd9159b1bf7e2?s=128

Sammy Kaye Powers

May 26, 2017
Tweet

Transcript

  1. 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. 13.

    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. 16.
  4. 22.

    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”…
  5. 30.

    $ brew tap homebrew/homebrew-php $ brew install php71 $ brew

    install php71-xdebug on Homebrew Install +
  6. 33.
  7. 58.

    But wait! I have examples of other setups! & *

    (see me after class for more info)
  8. 59.

    THANKS! SAMMY KAYE POWERS @SammyK SammyK.me Host of @PHPRoundtable @ChiPHPUG

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