• 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
Re: Breaking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Breaking


  • Subject: Re: Breaking
  • From: matt neuburg <email@hidden>
  • Date: Tue, 17 Dec 2002 07:35:12 -0800

On Sat, 14 Dec 2002 09:17:36 -0500, Timothy Larkin <email@hidden> said:

>I am trying to find the Cocoa equivalent of DebugStr() that will evoke
>the debugger dynamically when some assertion fails. I can raise an
>exception, but the exception mechanism, as far as I can tell, cannot
>invoke the debugger.

First, you have to be debugging in order to stop at a breakpoint (not like OS 9 where you can just fall into MacsBug regardless).

Okay, so the only place you can break is at a breakpoint that you've explicitly set in gdb. So the problem is where to put a breakpoint such that it will be reached on every exception. Here's one way:

@implementation NSApplication (exceptionCatcher)
- (void)reportException:(NSException *)e {
// put a breakpoint here
}
@end

m.

matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
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.

  • Prev by Date: Re: NSTableView - Alternating blue and white background
  • Next by Date: Re: AddressBook: Why can't I add a person, that is not (yet) in the AB, to a group?
  • Previous by thread: Breaking
  • Next by thread: Re: Breaking
  • Index(es):
    • Date
    • Thread