So there’s been a number of interesting tools, tips, and tidbits of the fixing and fussing sort floating by recently, let’s collect them all up shall we?
The Super Debugger (superdb for short) is a dynamic, wireless debugger for iOS (and theoretically, Mac) apps. It works as two parts: a static library that runs built in to your app and a Mac app to send commands to the app, wirelessly. Your app starts up the debugger via this library, which broadcasts itself on your local network. The Mac app can discover these debug sessions via Bonjour and connect to them.
You can then send messages to your live objects as the app is running on the device (or Simulator). No need to set any break points. Any message you can send in code can also be sent this way. This allows you to rapidly test changes and see their results, without the need to recompile and deploy.
The debugger will even let you rapidly resend messages involving numeric values. When trying to tweak an interface measurement, for example, you can just click and drag on the value and see the changes reflected instantly on the device…
Between the two, that’s enough coolness to send global warming shuddering into reverse, doncha think?
UIView+DTDebug.m detects those annoying background drawing calls that always seem to slip in somewhere.
garnett / DLIntrospection makes examining objects at runtime convenient.
Did you know weak properties are not KVO-compliant? Debug usage of Objective-C weak properties with KVO.
The debugger of royalty introduces
… step one on the road to sanity: the debug proxy. This is useful when you want to find out how a particular class gets used, e.g. when it provides callbacks that will be invoked by a framework. You can intercept all the messages to the object, and inspect them as you see fit…
How to Use Instruments in Xcode is an excellent introduction to that, should you need one.
Intermediate Debugging with Xcode 4.5 has good stuff on leveraging breakpoints.
Xcode LLDB Tutorial introduces how to use predicates and KVC in the debugger;
Querying Objective-C Data Collections is the don’t-miss followup.
Hooked on DTrace, part 1 and part 2 and part 3 and part 4 are must-reading for when you want to get below the Instruments level. Also check the comments for pointers to good stuff like Top 10 DTrace scripts for Mac OS X and this DTrace book.
Analysing iOS App Network Performances on Cellular/Wi-Fi shows how to create HAR files so as to take advantage of its various nifty helper tools.
There’s somewhat of a certain symmetry here: going down just as far down as it’s possible to go debugging in “Assembly Dissembling” was what the first post we made after signing up to guide development of the Atimi Mobile Sports Framework was about, and after doing so from support of seven teams and two sports to thirteen teams and five sports across iOS, Android, and BlackBerry 10, it’s about time to shake things up a bit; and here we are, our first post after leaving is about debugging too! Great place for a full time job, Atimi, we encourage you to check out their positions if you’re looking for one; but we’re off now to focus on a more equity-involving opportunity. Not completely, though, a little variety on the menu is always welcome; so if you have any little bite-sized projects that need some chewing, drop us a line and we’ll see what we can fit in!
MGBenchmark for timing operations hard to profile with Instruments
This Xray Editor “The missing visual feedback tool for iOS developers” looks mighty cool.
Reveal is another inspector tool.
To avoid debugging unavailable or obsolete API usage, try DeployMate.
SimulatorRemoteNotifications “is an iOS library to send (fake) remote notifications to the iOS simulator.”
SimPholders: “A small utility for fast access to your iPhone Simulator apps.”
thread_return.py “Prints the return value of the last function you stepped out from.”
gist:8213806: “Cute macro from Kyle Van Essen to provide compiler errors for key paths which do not exist.”
NSHipster on Benchmarking talks about the private dispatch_benchmark.
heardrwt / RHObjectiveBeagle “is an Objective C debugging tool that can sniff out class instances on the heap.”
FLEX (Flipboard Explorer) “is a set of in-app debugging and exploration tools for iOS development.”
iOS Console: “The most awesome iOS console log viewer. Ever.”
- Debugging: A Case Study
- Dancing in the Debugger — A Waltz with LLDB
- Debugging Checklist
- Activity Tracing
jspahrsummers / GHRunLoopWatchdog.h: “A class for logging excessive blocking on the main thread.”
swiftrsrc “generates Swift code for accessing elements of asset catalogs, storyboards, and color lists in order to avoid the error-prone practice of hardcoding strings into your code. It is heavily inspired by Square’s objc-codegenutils, which you should definitely look into if you’re working on an Objective-C project.”
MustOverride: “Provides a macro that you can use to ensure that a method of an abstract base class *must* be overriden by its subclasses.”
WBWebViewConsole: “In-App debug console for your UIWebView & WKWebView.”
Alpha: “the next generation debugging tool for iOS applications. It started as an unofficial fork from FLEX (Flipboard Explorer), but continued to be actively developed and grow exponentionally.”
Watchdog: “Class for logging excessive blocking on the main thread.”
Peek “is an open source library that lets you easily check your application against your user interface’s specification guide(s).”
ODUIThreadGuard: “A guard to help you check if you make UI changes not in main thread.”
IBAnalyzer: “Find common xib and storyboard-related problems without running your app or writing unit tests.”