LLDB Extension for iOS App Development
- Show view hierarchy
- Easy operation of UserDefaults
- Show device information
- Show App information
- Show file hierarchy
- Open directory in Finder (Simulator Only)
- Show file contents
- Easy operation of HTTP Cookie
- Objective-C Runtime
-
clone this repository
-
Add the following line to ~/.lldbinit
command script import {PATH TO iLLDB}/src/iLLDB.py
(lldb) ui tree -h
usage: tree
[-h]
[-d]
[-s]
[--depth DEPTH]
[--with-address]
[--window WINDOW]
[--view VIEW]
[--vc VC]
[--layer LAYER]
optional arguments:
-h, --help
show this help message and exit
-d, --detail
Enable detailed mode (default: False)
-s, --simple
Enable simpled mode (default: False)
--depth DEPTH
Maximum depth to be displayed (default: None)
--with-address
Print address of ui (default: False)
--window WINDOW
Specify the target window (default: None)
--view VIEW
Specify the target view (property or address) (default: None)
--vc VC
Specify the target viewController (property or address) (default: None)
--layer LAYER
Specify the target CALayer (property or address) (default: None)
-
Show keyWindow hierarchy
ui tree
ui tree -s # simple
ui tree -d # detail
-
Show the hierarchy of a specific view
ui tree -view {property name of view}
-
Show the hierarchy of a specific viewController
ui tree -vc {property name of viewController}
-
Show the hierarchy of a specific window
ui tree -window {property name of window}
-
Show the hierarchy of a specific layer
ui tree -layer {property name of layer}
usage:
[-h]
{read,write,delete,read-all,delete-all}
...
UserDefault debugging
optional arguments:
-h, --help
show this help message and exit
Subcommands:
{read,write,delete,read-all,delete-all}
read
read UserDefault value
write
write UserDefault value
delete
delete UserDefault value
read-all
read all UserDefault value
delete-all
delete all UserDefault value
ud read "key"
ud write "key" "value"
ud delete "key"
ud read-all
ud delete-all
Displays device information.
device info
Displays App information.
app info
(lldb) file tree -h
usage: tree
[-h]
[-p PATH]
[-b]
[-l]
[--documents]
[--tmp]
[--depth DEPTH]
optional arguments:
-h, --help
show this help message and exit
-p PATH, --path PATH
path (default: None)
-b, --bundle
bundle directory (default: False)
-l, --library
library directory (default: False)
--documents
documents directory (default: False)
--tmp
tmp directory (default: False)
--depth DEPTH
Maximum depth to be displayed (default: None)
-
Display the contents of the Bundle directory
file tree --bundle
-
Display the contents of the Library directory
file tree --library
-
Display the contents of the Documents directory
file tree --documents
-
Display the contents of the tmp directory
file tree --tmp
-
Display the contents of a specific directory
file tree --path {url}
(lldb) file open -h
usage: open
[-h]
[-p PATH]
[-b]
[-l]
[--documents]
[--tmp]
optional arguments:
-h, --help
show this help message and exit
-p PATH, --path PATH
path (default: None)
-b, --bundle
bundle directory (default: False)
-l, --library
library directory (default: False)
--documents
documents directory (default: False)
--tmp
tmp directory (default: False)
(lldb) file cat -h
usage: cat
[-h]
[--mode MODE]
path
positional arguments:
path
path
optional arguments:
-h, --help
show this help message and exit
--mode MODE
mode [text, plist] (default: text)
-
text file
file cat "path"
-
plist file
file cat "path" --mode plist
Displays the value of the HTTP cookie information.
(lldb) cookie read -h
usage: read
[-h]
[--group-id GROUP_ID]
[--domain DOMAIN]
[--name NAME]
[--path PATH]
optional arguments:
-h, --help
show this help message and exit
--group-id GROUP_ID
AppGroup identifier for cookie storage (default: None)
--domain DOMAIN
Domain for Cookie (default: None)
--name NAME
Name for Cookie (default: None)
--path PATH
Path for Cookie (default: None)
-
Show all cookies
cookie read
-
Show only cookies for specific domains
cookie read --domain example.com
-
Show only cookies with a specific name from a specific domain
cookie read --domain example.com --name KEYNAME
Delete cookie value.
After executing the command, you will be asked to confirm before deleting. If you type "Yes", the deletion will be executed as is.
(lldb) cookie delete -h
usage: delete
[-h]
[--group-id GROUP_ID]
[--domain DOMAIN]
[--name NAME]
[--path PATH]
optional arguments:
-h, --help
show this help message and exit
--group-id GROUP_ID
AppGroup identifier for cookie storage (default: None)
--domain DOMAIN
Domain for Cookie (default: None)
--name NAME
Name for Cookie (default: None)
--path PATH
Path for Cookie (default: None)
-
Delete all cookies
cookie delete
-
Delete only cookies for specific domains
cookie delete --domain example.com
-
Delete only cookies with a specific name from a specific domain
cookie delete --domain example.com --name KEYNAME
Commands for debugging with Objective-C Runtime
(lldb) objc inherits -h
usage: inherits
[-h]
object
positional arguments:
object
object
optional arguments:
-h, --help
show this help message and exit
(lldb)objc inherits UIWindow()
# NSObject -> UIResponder -> UIView -> UIWindow
(lldb) objc methods -h
usage: methods
[-h]
[--class CLASS_NAME]
[-c]
[-i]
object
positional arguments:
object
object
optional arguments:
-h, --help
show this help message and exit
--class CLASS_NAME
Specify a target class in the inheritance hierarchy (default: None)
-c, --class-only
Show only class methods (default: False)
-i, --instance-only
Show only instance methods (default: False)
(lldb) objc properties -h
usage: properties
[-h]
[--class CLASS_NAME]
object
positional arguments:
object
object
optional arguments:
-h, --help
show this help message and exit
--class CLASS_NAME
Specify a target class in the inheritance hierarchy (default: None)
(lldb) objc ivars -h
usage: ivars
[-h]
[--class CLASS_NAME]
object
positional arguments:
object
object
optional arguments:
-h, --help
show this help message and exit
--class CLASS_NAME
Specify a target class in the inheritance hierarchy (default: None)
iLLDB is released under the MIT License. See LICENSE