Skip to content

Instantly share code, notes, and snippets.

@bahaddinyasar
Created August 28, 2012 08:38
Show Gist options
  • Save bahaddinyasar/3496228 to your computer and use it in GitHub Desktop.
Save bahaddinyasar/3496228 to your computer and use it in GitHub Desktop.
IOS Debugger(lldb): Tips and Tricks
The po command stands for "print object."
The symbol $eax refers to one of the CPU registers. In the case of an exception, this register will contain a pointer to the NSException object.
Note: $eax only works for the simulator, if you’re debugging on the device you’ll need to use register $r0.
(lldb) po [$eax class]
You will see something like this:
(id) $2 = 0x01446e84 NSException
You can call any method from NSException on this object. For example:
(lldb) po [$eax name]
This will give you the name of the exception, in this case NSInvalidArgumentException
(lldb) po [$eax reason]
This will give you the error message: (unsigned int) $4 = 114784400 Receiver (<MainViewController: 0x6b60620>) has no segue with identifier 'ModalSegue'
Reference: http://www.raywenderlich.com/10209/my-app-crashed-now-what-part-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment