Mobile Zone is brought to you in partnership with:

Programmed Macs since Inside Mac came in 3-ring binders; programmed iPhones since the first day the SDK was downloadable. 51 apps in the App Store to date, and always looking for new and interesting contracts! Alex is a DZone MVB and is not an employee of DZone and has posted 134 posts at DZone. You can read more from them at their website. View Full User Profile

Roundup: Debugging Goodies

04.01.2013
| 2217 views |
  • submit to reddit

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?

TOOLS:

PonyDebugger we’ve mentioned before but can’t do enough; network traffic debugging, Core Data browsing, view hierarchy displaying, so cool it’s downright frosty.

superdb: The Super Debugger by @jasonbrennan brings real time dynamism to your debugging:

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?

markd2 / GestureLab is good stuff for debugging gesture recognizers.

UIView+DTDebug.m detects those annoying background drawing calls that always seem to slip in somewhere.

garnett / DLIntrospection makes examining objects at runtime convenient.

Which reminds us of the DCIntrospect UIKit interface examiner you might have forgotten our last mention of.

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…

tomersh / NanoProfiler is a super lightweight individual function profiler.

siuying / IGWebLogger is a CocoaLumberjack logger which logs to the web in realtime.

Log Leech is a nifty-looking log formatter “Because System Logs Should be Beautiful.” Indeed.

TIPS:

Debugging Tips video presentation is the single best introduction to the basics we’ve seen (h/t: iosdevweekly!)

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.

Stack-trace-dumping regular-expression-based symbolic breakpoints in LLDB

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!

 

Published at DZone with permission of Alex Curylo, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)