Once upon a time Last time when QA comes to me, they want visual debugging tool for our iOS apps. I already researched this subject, and already use CocoaLumberjack tool (with XCodeColors plugin of course), but it was not enough.

You can find PonyDebugger GitHub:square/PonyDebugger.


I’m using CocoaPods, so it really easy to install

If you would like to use the latest version of PonyDebugger, point to the Github repository directly.

Install dependencies.



PonyDebugger’s main entry points exist in the  PDDebugger singleton.


To connect automatically to the PonyGateway on your LAN (via Bonjour):


Or to open the connection to a specific host, for instance  ws://localhost:9000/device:


To manually close the connection:


Network Traffic Debugging

To enable network debugging:


PonyDebugger inspects network data by injecting logic into  NSURLConnectionDelegate classes. If you want PonyDebugger to automatically find these classes for you:


This will swizzle methods from private APIs, so you should ensure that this only gets invoked in debug builds. To manually specify delegate classes:


These methods should be invoked before the connection is opened.

Core Data Browser

PonyDebugger also allows you to browse your application’s managed objects. First, enable Core Data debugging:


To register a managed object context:


View Hierarchy Debugging

To enable view hierarchy debugging:


PonyDebugger will inject logic into  UIView add/remove methods to monitor changes in the view hierarchy.
You can also set the attributes you want to see in the elements panel by passing an array of  UIView key path strings


PonyDebugger uses KVO to monitor changes in the attributes of all views in the hierarchy, so the information in the elements panel stays fresh.

Remote Logging

To enable remote logging:


Example usage:


The repository contains a test application to demonstrate PonyDebugger’s capabilities and usage.
And when I do all steps, nothing happens ….


Okay, so for exclude any mistakes lets check the list:

  • your device and you mac in one wi-fi network
  • you opened correct address  ws://localhost:9000/
  • you restarted bounjour service or even mac

In my case problem was very obvious, when executing on device localhost is a device, but not a host machine, so you just need to open your network preferences and get your IP-address.


Also, I was needed to debug core data state, for this is not enough


you need to point on your context(one or many) to observing.


For category access used MagicalRecord


And in the end, it doesn’t even matters…

Because PonyDebugger:

  • Slow
  • For network requests uses NSURLConnection and delegates, and using with NSURLSession not supported. There are some tweaks for using with AFNetworing 2.0, but I don’t use it.

Oksana Kovalchuk

Passionate IOS Developer

Related Posts


Xcode Project Structure Example

Okay, this subject is very “intimate” for every developer, but I hope, this article will help somebody in his way to perfect organization of project structure. So lets start. Related


Xcode build script using

It’s not a secret, that Xcode can run BASH scripts on some events.   But, sometimes when you add your script to Xcode, you don’t think about future modification, git blame, and merge conflict. I Read more...


Git cloning with sub-modules

For cloning  git repo with submodules, use this command: [crayon-5b0515848eff5652210877/] For already cloned repos, for clone submodules use next command in repo root: [crayon-5b0515848f007279844820/] And that’s all, Folks. Related