Re: Default Core Data errors
Re: Default Core Data errors
- Subject: Re: Default Core Data errors
- From: Kyle Sluder <email@hidden>
- Date: Wed, 14 Oct 2009 10:38:47 -0700
On Wed, Oct 14, 2009 at 10:30 AM, Rick Mann <email@hidden> wrote:
> Is there a way I can get at that programmatically, rather than via gdb? I'm
> very clumsy in gdb.
Your time will be better spent learning how to use the debugger.
Quick crash course:
1. Use `po` to print objects. Example:
>> po theError
<NSError 0x12345678>
2. Use regular ObjC syntax to call methods on objects. Sometimes you
need to provide type information, because gdb doesn't have as much
information available to it as the compiler does. Example:
>> po (id)[theError description]
"The document could not be opened."
3. Use the `call` command to call arbitrary functions, methods, etc.
Again, casting might be necessary.
>> call (void)NSLog(@"The error says: %@", (id)[theError description])
debugged-process[2134] 00:00:00 The error says: The document could not
be opened.
Of course, use the Debugger panel to select different stack frames,
which in turn affects what variables are in scope.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden