Xcode Symbolic breakpoints
Symbolic breakpoint is one of the few amazing features of Xcode. It allows you to add a breakpoint against every method in your code — that matches with the name of your breakpoint. This means you don’t need to worry about method signature or which module it belongs to, whether it is a public or a private API.
Do it yourself
- Open your Xcode project
- Goto breakpoint navigator
- Click on the + button at lower left corner
- Select “Symbolic Breakpoint…”
- A new breakpoint will be added to the list and a pop-up window will ask you to fill in details.
- Add the name of your method and press enter to create your symbolic breakpoint.
- Run the app and you will see your breakpoint changing into a list of all method names that are indexed by Xcode.
- If your breakpoint is for a private API — you may not see this list but be assured that the debugger will pause when it hits your method.
You can also restrict your symbolic breakpoint to a particular framework or module. This enables you to avoid a lot of noise (if your method name is very common).
Originally published at www.amreshkumar.com on May 8, 2018.