Read the rest of the article for the how-to...
Start a terminal session, and launch the application to be viewed via the command line:
gdb /Applications/Mail.app/Contents/MacOS/MailThis brings up gdb, ready to launch mail, so just type (at the gdb prompt), 'r' and then hit enter, and Mail.app will launch. You'll see a bunch of text go by, and eventually, Mail.app will show up on your screen.
Once the app is launched, go to the terminal window and type a ctrl-c. This will pause the app and give you a prompt. Then do this, entering each line below as a new line in gdb:
p $o = (unsigned int) objc_getClass("NSUserDefaults")
p $s = (unsigned int) sel_getUid("standardUserDefaults")
p $o = (unsigned int) objc_msgSend($o, $s)
p $s = (unsigned int) sel_getUid("dictionaryRepresentation")
p $o = (unsigned int) objc_msgSend($o, $s)
p $s = (unsigned int) sel_getUid("description")
p $o = (unsigned int) objc_msgSend($o, $s)
p (void) NSLog($o)This will cause all of the registered defaults and their current values to be printed out.
[Editor's note: I just tried this with TextEdit, and it worked just as described - a very neat trick!]

