Did You Guys Know About The CakePHP DebugKit?
You know when there's something out there that you know you will like, but for whatever reason you don't check it out right away. Like the TV show Arrested Development or fleece. That was me with the CakePHP DebugKit. For those even more out of the loop then me, the DebugKit is a CakePHP plugin that adds a bunch of information panels to your app.
If this was your app (it's not - it's mine) and you had the DebugKit installed you'd get that extra panel in the upper right.

Installing
I finally got around to installing it on one of my projects this past weekend. It is so stupidly easy to install, it makes me what to apologize to everyone who has suffered through the 10+ step install process that usually come with my code. My bad.
Here's my running commentary, post install:
+0 seconds - Meh, kind of cool, but not really life shattering.
+25 seconds - It really is convenient having all this information at my fingertips.
+39 seconds - I bet this would have come in handy all those times I nearly went crazy trying to figure out some stupid bug. Plus I would have saved all that time I wasted on GTA IV working out my anger issues on random pedestrians.
+55 seconds - Damn, this thing is pretty great.
+67 seconds - Wait. Why didn't I think of this? I'm such an idiot. *hitting head* stupid, stupid, stupid...
+67 seconds to +2940 seconds - Playing GTA IV. Listening to the song "Disgruntled" by The Randumbs on repeat.
For the benefit of those who have never used the DebugKit here's some screen captures of each panel:
Cake Icon
The CakePHP icon on the far left simply opens and closes the panel. If you don't have the file /app/webroot/img/cake.icon.gif it will say "cakePHP" instead. Small bug there, as it should probably read "CakePHP". I actually feel good about this, because it proves Mark Story isn't perfect. Did I mention this was Mark Story led project (with contributions from others)? I was trying to avoid mentioning this, since he already gets enough good press. How long until cakephp.org reads "CakePHP starring Mark Story"? I put the over/under at 2 months.

Session
The session panel gives you the same information you'd see if you did a pr($_SESSION). Not that any of us would ever do that. Let's try that again. The session panel gives you the same information you'd see if you put a break in your code and used Xdebug to look at the $_SESSION var. That's better.
Request
The request tab is probably my favorite, but because of the post -> redirect nature of most CakePHP apps it misses out on the most useful information. It would be super helpful if it also had information from the previous request, so that if you submitted a form and then were automatically redirected you would still be able to see that post data. It's too bad the DebugKit isn't open source or I would totally go add that.
Sql Log
Ha! Another bug: SQL is an acronym and should be in CAPS! Or is this like the whole Ajax/AJAX thing? You know what? Forget I mentioned it. The Sql Log takes the sqL dump that would normally be shown at the bottom of the page and moves it into a panel. This is great if the sQL output was messing up your design.
Timer
The timer panel gives a break down of how long various parts took to run. I would guess if you are having real performance issues this will just point you to your controller action and you'll be on your own from there. Although if you went nuts using requestActions your views/elements could have long render times. Wait, would this show multiple entries for Controller Action in that case? And then another view render? Will I actually test this instead of endless asking questions? Unlikely.
Log
This panel shows you any new log entries that were made during the request.
Memory
Probably the weakest of all the panels, which is why it's on the far right. The other panels were like "fine you can hang around with us, just stand over there out of the way." Then they said some mean things about him and even though they thought he couldn't hear them, he did. Frowny face.







8 Comments
I like your idea for post data preservation. I will be awaiting your patch!
I will take a look at the post data preservation thing though. I was going to dig around in the code anyway, because I was impressed with how well packaged and easy to install it is.
evilbloddydemon: the variables panel was added later on, perhaps this is an earlier package?
i keeeeed! i keeeed!
Have a try and love it.
Thanks!