Newbie: debugging raised exception
Newbie: debugging raised exception
- Subject: Newbie: debugging raised exception
- From: Jérôme Laurens <email@hidden>
- Date: Thu, 6 Jan 2005 10:03:08 +0100
Something that might help people in debugging their app.
I've not seen it in the archives, hth.
put the following code in one of your sources and add a break point at line [super raise].
Then add to the arguments of your executable
-NSException_Debug YES
Each time you want to find where an exception is raised, you just have to check the above argument box and debug your app.
@interface NSException_Debug: NSException
@end
@implementation NSException_Debug
+ (void) load;
{
NSAutoreleasePool * P = [[NSAutoreleasePool alloc] init];
if([[NSUserDefaults standardUserDefaults] boolForKey: @"NSException_Debug"])
[self poseAsClass: [NSException class]];
[P release];
return;
}
- (void) raise;
{
[super raise];// the break point HERE
return;
}
@end
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden