var_dump($foo)

print_r($bar)

die($baz)

Are these your current debugging tools? Wouldn't it be nice to see $foo, $bar, and $baz while the code is still being executed? Watch it change, live? And not have it just dumped all over the output of your otherwise beautiful app? We'll install XDebug, set up your IDE to use it (with examples shown for PhpStorm, Netbeans, and ZendStudio), then we'll actually walk through some badly written code that needs to be debugged.

Level: Beginner

Comments

Comments are closed.

Troy Potter at 22:36 on 3 Feb 2017

Not sure it convinced me to use xdebug, but I'm definitely going to see if I can get it up and running when I get back to the office

Eric Morris at 11:09 on 4 Feb 2017

I cut my teeth as a programmer on C and C++, and am very familiar with step-wise debugging. That being said, I am *not* used to having the same tools (or using them effectively) for scripting languages like PHP. I currently use Notepad++ for my primary PHP editor. Though Notepad++ has good syntax coloring for PHP, I never really considered it an IDE. I was surprised to learn (from this talk) that Xdebug can be hooked into Notepad++. Now that I know this, I am going to investigate this avenue, in additional to considering switching to PHPStorm. In this regards, this talk was helpful for me. Thanks!

At some times I felt that Sean was not "motivated" giving the talk. Maybe it's just my impression, but I felt it little interactive and a little bit slow. I think the subject is good and it has a lot of potential.

I *did* get xDebug working correctly in my environment for the first time while attending this presentation, but I felt like far too much time was spent on the speaker introducing himself and on the "where to install" part of the talk. Those could have been 2 minutes and 5 minutes respectively, and then we could have gotten a more thorough introduction to the kinds of things xDebug is helpful with, how it differs from other tools such as phpcs and Blackfire, and common gotchas. None of that was addressed in this talk.

Sean Prunka (Speaker) at 10:38 on 7 Feb 2017

Thank you all for the feedback. I am planning on building out a more advanced version of this talk that would go into more depth with using Xdebug for both Profiling and for exploring unfamiliar codebases. I apologize if my energy seemed on the low side. I think I can agree that I was a little off. I'm sorry for that.

Lawrence Shea at 13:09 on 7 Feb 2017

Was hoping the talk would be a little more advanced.