Var_dump sucked.

Why I didn’t use var_dump() for a long time, even though it has very valuable information in it ? You most probably guessed it. It looks terrible. Even when you fix it with adding <pre> tags around it, it’s still ugly.

So I could never talk myself into using it, and because of that for the past few years, I did a print_r(), wrapped in those “pre” tags.

Until I saw a screencast by Jeffrey Way on Laravel, and I saw the single most beautiful var_dump in the history of mankind.

Look at it! It’s so pretty! It’s the same data, but so much has changed!

So I wanted it too. After some googling, I found out, that it is a PHP Extension (that anyone can install) and not a Chrome extension (which was my initial guess). It’s called Xdebug, and you can get it at http://www.xdebug.org and you’ll probably want to read more about the installation ( http://xdebug.org/docs/install )

In addition, I initially thought, that I’d have some difficulties installing and setting Xdebug up, since I’m a MAMP user (I like graphical interfaces and all that good stuff, I just can’t help it, that’s why I am so excited about Xdebug after all). Turns out, that I was wrong (again).

Enabling Xdebug on MAMP (Pro) is as simple as, well – enabling Xdebug on MAMP (Pro). All you really have to do is:

Open MAMP

File -> Edit Template -> PHP -> PHP (your-version).ini

Go to the very bottom and uncomment the Xdebug extension (remove the semicolon at the beginning of the line), like so:

I too came here after watching a Jeffery Way tutorial…. One thing to note, make sure that you have html_errors = On set your php.ini. I’ve had Xdebug installed for months, and wasn’t seeing pretty output until I set that.