Setting breakpoints on all methods in XCode

To be able to set breakpoints on all methods do the following:

  1. Switch to LLDB debugger. Go to Edit Schemes, click Run, on Info panel choose this debugger.
  2. Run your app, pause it and type the following on log:

    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.
  3. “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.

Also, we can put breakpoints by selector name:

Inspired by this solution.

More about LLDB debugger.

Leave a Reply

Your email address will not be published. Required fields are marked *