• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Newbie: debugging raised exception
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Newbie: debugging raised exception
      • From: Charlton Wilbur <email@hidden>
  • Prev by Date: Re: [OT] for the record mmalcom
  • Next by Date: Re: Newbie: debugging raised exception
  • Previous by thread: Re: Get text height to print a custom view with NSTextView subview
  • Next by thread: Re: Newbie: debugging raised exception
  • Index(es):
    • Date
    • Thread