To be able to set breakpoints on all methods do the following:
- Switch to LLDB debugger. Go to Edit Schemes, click Run, on Info panel choose this debugger.
- Run your app, pause it and type the following on log:
1breakpoint set -r . -s <PRODUCT_NAME>
Here, “.” is a regular expression, where to put breakpoints. In this case it will put everywhere on everymethod. “-s” means that breakpoints will be put only in your project files, not frameworks. - “br list” command allows to look at all breakpoints list. You can’t see them on Xcode UI and they will be removed after the next Run.
Using LLDB we can put breakpoint on all ViewDidLoad methods by name, for example.
1 |
(lldb) breakpoint set -n ViewDidLoad |
Also, we can put breakpoints by selector name:
1 |
(lldb) breakpoint set -S alignLeftEdges: |
Inspired by this solution.
More about LLDB debugger.