Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Debug interactively @sota1235
Slide 2
Slide 2 text
var_dump($sota1235); • @sota1235 • Call me ‘kirin’ • PHP & JavaScript • Mercari, Inc.
Slide 3
Slide 3 text
http://sota1235.hatenablog.com/entry/2017/01/01/175228
Slide 4
Slide 4 text
I did it
Slide 5
Slide 5 text
Today’s theme
Slide 6
Slide 6 text
Debug
Slide 7
Slide 7 text
Debugging method • Using var_dump, echo • php -a • Writing tests • IDE • etc…
Slide 8
Slide 8 text
Debugging method • Using var_dump, echo • php -a • Writing tests • IDE • etc…
Slide 9
Slide 9 text
Using REPL (php -a) • Easy to use • Can load files • Good integration with CLI
Slide 10
Slide 10 text
Is it the best way? • Bother to require autoloader • Reset state every time • Not good for many autoloader files…
Slide 11
Slide 11 text
No content
Slide 12
Slide 12 text
psysh http://psysh.org/
Slide 13
Slide 13 text
psysh • Rich CLI • Customizable • We can make own REPL
Slide 14
Slide 14 text
Rich REPL • Auto complete (with Tab key) • Useful commands • history, documentation, show properties • Rich UI
Slide 15
Slide 15 text
Customizable • We can place config file • ~/.config/psysh/psysh.php • We can do anything if PHP can
Slide 16
Slide 16 text
Slide 17
Slide 17 text
'Using global config', 'commands' => [ new \Psy\Command\ParseCommand, ], ]; Load local config
Slide 18
Slide 18 text
Slide 19
Slide 19 text
Thank you