Re: Debugging a specific object
Re: Debugging a specific object
- Subject: Re: Debugging a specific object
- From: "Louis C. Sacha" <email@hidden>
- Date: Wed, 7 Jul 2004 03:37:29 -0700
Hello...
You could create a simple subclass of NSProxy that either logs the
method that is being called in it's implementation of
forwardInvocation:, or has a breakpoint set within the
forwardInvocation: method.
Instead of using or returning your object directly, return the proxy
to the object.
If your object is a view that is created in a nib, you'll need an
outlet to the view and you can replace it with a proxy in the
awakeFromNib method by doing the following:
[[problemView superview] replaceSubview:problemView
with:(NSView *)proxyForProblemView];
Note: if you use the outlet for anything other than making the
switch, you'll want to change the outlet to point to the proxy as
well.
Hope that helps,
Louis
Hi,
I'm just wondering if there is a way to have the XCode
debugger trace or break each time a particular Objective
C object receives a call to any of its selectors, including
those it has inherited from a higher class. I need to be
able to see how Cocoa is calling my object as it is being
displayed differently to how I want it to be, and so far
attempts to debug by overloading inherited methods have
been fruitless.
Normally XCode lets you break in specific methods, but
I need to have it do this for all methods in a specific object.
Any help greatly appreciated.
Regards,
Tim.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.