Over a million developers have joined DZone.

A Pony Debugger for Princess Coders

DZone 's Guide to

A Pony Debugger for Princess Coders

· Mobile Zone ·
Free Resource

So there you were, squealing, “Daddy, I want a Pony for my debugging!” Now look what those super helpful folks over at Square have come up with for you:

PonyDebugger: Remote Debugging Tools for Native iOS Apps

PonyDebugger is a remote debugging toolset that operates as a client library and gateway server combination using Chrome Developer Tools on a web browser to debug an application’s network traffic and data store. We began by implementing an iOS client library to debug our application’s network traffic sent via NSURLConnection and its Core Data stack. To get started, check out the GitHub repository.

Improved network traffic debugging is always handy, although our QA department has been managing to get by with Charles, but wait, what? “And its Core Data stack?”

Core Data Browser

Another cool feature of PonyDebugger is its ability to remotely debug an iOS application’s Core Data stack. By registering managed object contexts, a user can browse all of their entities, properties and drill-down relationships through Chrome’s IndexedDB browser.


The great advantage is that it doesn’t require access to nor implementation of an SQLite data store. This means that browsing data is easy, whether through the Simulator or on a real device. There’s also no difference between tracking an in-memory object store or an object store that has a SQLite persistent store, as it interacts directly with an NSManagedObjectContext.

Whoa. How does that work?

How It Works

The WebKit Web Inspector, which Chrome Developer Tools is heavily based on, implements a protocol that defines all of the commands, events and types that each debugger “domain” implements. For example, the network debugging feature is implemented by communicating events and commands with Inspector’s Network Domain protocol.

Chrome Developer Tool’s Remote Debugging API exposes and documents (part of) its API for developers to communicate their own data to its developer tools application. We created an iOS client that implements this protocol and communicates a native iOS application’s network requests and managed objects to the developer tools through a WebSocket connection.

Well, that gets our Totally Awesome Award 2012 Edition™ hands down. Well-deserved kudos to the authors for their great work, and to Square for open sourcing it for the rest of us!


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}