Quantcast
Viewing latest article 38
Browse Latest Browse All 170

Subclassing for Debugging

Paul Samuels:

A really useful trick when debugging is to subclass the thing you are interested in just to make it easier to search for inside the various debugging tools.

[…]

There are plenty more places like instruments, logging etc to make use of this technique.

It can also be useful to subclass to override -retain and -release so you can easily see when they are being called. However, this is only possible if your class inherits from an Objective-C class that you control.


Viewing latest article 38
Browse Latest Browse All 170

Trending Articles