views:

196

answers:

2

I'd like to be able to add a runtime object inspector to my iPhone app, mostly for debugging purposes.

This would let me do something like:

[inspector addObject:someObject];

and in my app, a view would appear that would let me browse and change the public properties of the object in question.

Possibly it would work with a subset of the properties of the object in question, or maybe even only a single property.

I know that Objective C exposes the ability to do this via it's runtime api:

http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008048-CH1-SW1

http://code.google.com/p/runtimebrowser/

http://stackoverflow.com/questions/1282563/obtain-list-of-class-methods-for-an-arbitrary-class

What I'm looking to do is not rewrite the wheel, I guess. Is it out there anywhere?

Note: I know I can use XCode's debugging tools to do inspection of objects, but this would be for runtime modification of properties by testers, and if the interface was nice enough, for end users

+1  A: 

If you were working on a Mac, there is F-Script. It includes an interactive command-line and object browser that let you inspect and manipulate objects. However, it does not work on the iPhone and I don't believe there is any work being done to do so.

I'm wondering if it might be possible to run it against the simulator, though.

Colin Gislason
A: 

Hi,

Did you find a solution for this?

Thanks,

Auday

Auday
nope... no solution that I could find. i'll post here if I do!
Brad Parks