Data Formatters in XCode (or how to make XCode suck less at custom containers)

Ever been working on somebody else’s code with their cruddy old custom string class and come across this?

Really? This is all you got?

Gee, thanks summary!

…only to drill down into the object to find more of this:

whaaaaaaaaaaaaarrrrrrgggggaaaaaarrrrrrrblllll

WHARGARBL?

Do you see my actual string there at the very bottom? Man… I’d really hate to have to do this every damned time I want to get at a string! Luckily, that empty summary box is not the final word in debugger previews. Instead you can use a handy little scripting language to create DATA FORMATTERS that will do the work for you. Check this out!

What's that?

….and then…

HOOOOOOOOO!

BAM! You win. By the way, in case  you were wondering: The ‘:s’ gives you the summary field of the value you’ve drilled down to.

Also this:

The Console can be useful as well.

P.S. — You can build Data Formatters into your project via a Bundle, instructions HERE

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s