Sammy Kaye Powers
An Intro To
Step Debugging in
Dance
The
Chicago PHP UG
March 27th, 2017
Slide 2
Slide 2 text
Does not work for
Slide 3
Slide 3 text
What is
Debugging?
Finding and fixing of unexpected behavior in code
Slide 4
Slide 4 text
So you write
Some Code
Slide 5
Slide 5 text
Does not work
Slide 6
Slide 6 text
You could check the
Error logs
Slide 7
Slide 7 text
All the things
var_dump()
Slide 8
Slide 8 text
No content
Slide 9
Slide 9 text
OR
Slide 10
Slide 10 text
Use a
‘er
Slide 11
Slide 11 text
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++)
Slide 12
Slide 12 text
…now is the perfect time to learn
Step Debugging
BNEW!
Professional
Slide 13
Slide 13 text
Some step-debugging
Jargon
Slide 14
Slide 14 text
a signal that tells the debugger to pause the execution of your code
Breakpoint
Slide 15
Slide 15 text
run to the next breakpoint
Resume Program
Slide 16
Slide 16 text
if the next line is a function call, enter the function
Step Into
Slide 17
Slide 17 text
run to the end of the current function
Step Out
Slide 18
Slide 18 text
advance to the next line in the same scope
Step Over
Slide 19
Slide 19 text
a live portal into the code execution process
Debugging Console
Slide 20
Slide 20 text
shows the execution path to the point where the code was paused
Frames
I… don’t have a cool drawing for “frames”…
Slide 21
Slide 21 text
&
Environment
Setup
Slide 22
Slide 22 text
Setup
Slide 23
Slide 23 text
#1
Start listening to
debugging connections
Slide 24
Slide 24 text
#2
Set a
Breakpoint
Slide 25
Slide 25 text
Done!
Slide 26
Slide 26 text
Setup
Slide 27
Slide 27 text
configured
installed
installed
Slide 28
Slide 28 text
$ brew tap homebrew/homebrew-php
$ brew install php71
$ brew install php71-xdebug
on
Homebrew
Install +