Alex Rivera | Logout

Can you see the values of NSUserDefaults anywhere in the xcode debugger?

Asked 2010-06-14T18:22:55.663
14

Can you see the values of NSUserDefaults naywhere in the xcode debugger?

Just wondering if this is possible?

Thanks,

Nick

Edit
Report

1 Answer

42

I don't have a solution to view them in the debugger, but I can offer this:

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSLog(@"%@", [defaults dictionaryRepresentation]);

For some caveman-debugging:)

EDIT: As David suggest in the comment, we can now do this in the debugging console:

po [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]

Swift 3.0

po UserDefaults.standard.dictionaryRepresentation()
answered 2010-06-14T18:36:47.267

Your Answer