A Cookie Console
September 16
You break my heart into a thousand pieces and you say it’s because I deserve better? Sorry, that’s playing on the stereo right now. Gotta love From Autumn to Ashes.
Anyway, I finally have something awesome to blog about. Many of you will already know this, but it’s so freakin’ handy-dandy if you have to deal with cookies in your development. If you’re not on a Mac, sorry, skip this post.
OK, first, you need to be using Safari. There’s no better browser out there for OS X 10.4 Tiger, anyway, so I know you’re using it already. No, keep reading, don’t run down to the comments to tell me how awesome Firefox/Opera/IE 5.2/Camino/Shiira/OmniWeb/iCab is. I know they’re useful and all, but they all run like cold molasses on my machine, so shush.
Now, you need to have PithHelmet installed. Load up your page that stores the cookie (or the page that’ll send the data into the cookie) and open up Console (it’s in your Utilities folder if you still use the Finder to launch things. By the way, if you do, check this out). Now, in Safari go into the Pithhelmet menu (either the pith helmet in your menubar or in Safari -> Pithhelmet) and go to the Advanced menu and choose “Log cookies to console”.
Go to your cookie-recorder and get your cookies recorded (you know what I mean), then jump over to the Console and filter the result by the domain name of the site (localhost or www.eyeheartzombies.com for example). Hey! Lookie there! You can see your cookies, their names, what they hold, when they expire. All that good stuff you hate to debug!
I’m sure I’ll start using this more and more when I’m dealing with cookies and sessions (you can see session data, too, but that’s usually easier to check). What do you think? Anyone have any similar methods for checking cookies and other state data?