Skip to content

Commit ce98286

Browse files
author
Peter Argany
committed
Added FBPrintWindow command
1 parent ccf8dd5 commit ce98286

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

commands/FBPrintCommands.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
def lldbcommands():
2121
return [
2222
FBPrintViewHierarchyCommand(),
23+
FBPrintWindow(),
2324
FBPrintCoreAnimationTree(),
2425
FBPrintViewControllerHierarchyCommand(),
2526
FBPrintIsExecutingInAnimationBlockCommand(),
@@ -86,6 +87,18 @@ def run(self, arguments, options):
8687
description = re.sub(r'%s.*\n' % (prefixToRemove), r'', description)
8788
print description
8889

90+
class FBPrintWindow(fb.FBCommand):
91+
def name(self):
92+
return 'pwindow'
93+
94+
def description(self):
95+
return 'Print the recursion description of a Window, specified by <windowIndex>. Check which windows exist with "po (id)[[UIApplication sharedApplication] windows]".'
96+
97+
def args(self):
98+
return [ fb.FBCommandArgument(arg='windowIndex', type='int', help='The index of the Window to print a description of.', default=0) ]
99+
100+
def run(self, arguments, options):
101+
lldb.debugger.HandleCommand('po (id)[[[[UIApplication sharedApplication] windows] objectAtIndex:' + arguments[0] + '] recursiveDescription]')
89102

90103
class FBPrintCoreAnimationTree(fb.FBCommand):
91104
def name(self):

0 commit comments

Comments
 (0)