Re: Newbie: NSString and debugging question
Re: Newbie: NSString and debugging question
- Subject: Re: Newbie: NSString and debugging question
- From: "John C. Randolph" <email@hidden>
- Date: Wed, 16 Apr 2003 20:55:46 -0700
Sorry, my mistake. "po" actually sends -printForDebugger, not
-description.
-jcr
On Wednesday, April 16, 2003, at 08:16 PM, email@hidden wrote:
How do you make "po" give you the "description? In more recent
project builder versions, when I use po on structures like NSArray, I
get something like this:
(gdb) po self
<NSCFArray 0x29a1070>(
<NSCFDictionary 0x2998730>{
entry = <A HREF="/Name?Broderick,+Matthew">Matthew Broderick</A>;
}
)
But if I use description explicitly, I get this:
(gdb) po [self description]
({entry = "<A HREF=\"/Name?Broderick,+Matthew\">Matthew
Broderick</A>"; })
(gdb)
I *never* want the first option, and it's a hassle to type in the
second way. So is there a magic way to have 'description' sent with
each po?
Dan
On Friday, April 11, 2003, at 03:15 PM, John C. Randolph wrote:
On Thursday, April 10, 2003, at 04:56 PM, Marco Binder wrote:
In debug mode, you can enter "po yourVariableName" to see the
contents of any variable within the current scope.
To be precise, "po" (the "print object" command), sends -description
to the object in question, and shows the contents of the returned
string on the GDB console. IOW, it only works for objects, not for
other types.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
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.
--
Dan Wood
Karelia Software, LLC
email@hidden
http://www.karelia.com/
Watson for Mac OS X: http://www.karelia.com/watson/
The Arrogance of Power: <http://www.fatdawg.com/senbyrd.html>
To announce that there must be no criticism of the president, or that
we are to stand by the president, right or wrong,is not only
unpatriotic and servile, but is morally treasonable to the American
public.
-- Theodore Roosevelt
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
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.