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

  1. Open your Xcode project
  2. Goto breakpoint navigator
  3. Click on the + button at lower left corner
  4. Select “Symbolic Breakpoint…”
  5. A new breakpoint will be added to the list and a pop-up window will ask you to fill in details.
  6. Add the name of your method and press enter to create your symbolic breakpoint.
  7. Run the app and you will see your breakpoint changing into a list of all method names that are indexed by Xcode.
  8. 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.