Skip to content

Instantly share code, notes, and snippets.

@shepting
Created June 13, 2014 01:10
Show Gist options
  • Save shepting/91ec39f28c44a5d577b5 to your computer and use it in GitHub Desktop.
Save shepting/91ec39f28c44a5d577b5 to your computer and use it in GitHub Desktop.
Sample LLDBInit
# Print all the views in the window
command regex rd 's/^[[:space:]]*$/po [[[UIApplication sharedApplication] keyWindow] recursiveDescription]/' 's/^(.+)$/po [%1 recursiveDescription]/'
# Print all the view controllers in the window
command regex rvc 's/^[[:space:]]*$/po [[[UIApplication sharedApplication] keyWindow] recursiveDescription]/' 's/^(.+)$/po [%1 _viewControllerForAncestor]/'
# Print an autolayout trace
command alias at expr -o -- [[UIWindow keyWindow] _autolayoutTrace]
# Load the dynamic code for Reveal
command alias load_reveal_code expr (void*)dlopen("/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib", 0x2);
# Show the view controller
command alias vc expr -o -- (UIViewController *)[view _viewControllerForAncestor];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment