Over a million developers have joined DZone.

A Pony Debugger for Princess Coders

· Mobile Zone

Learn how to Deliver Better Mobile Apps Faster with Continuous Quality by managing the complexities of testing multiple devices and scenarios with this whitepaper from Perfecto Mobile.

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.

coredata-example.png

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!

Do you know Why Apps Succeed? Perfecto Mobile analyzed over 1,000 responses to their Digial Quality Strategies survey and aim to answer the question, "Why do apps succeed?" in this exclusive report.

Topics:

Published at DZone with permission of Alex Curylo, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

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

{{ parent.tldr }}

{{ parent.urlSource.name }}