Xcode Column BreakPoint

Karthik
3 min readAug 29, 2021

--

Let's discuss the new addition to the breakpoints family, colomn breakpoint.

Modified At: Aug 29, 2021

Xcode supports different types of breakpoints, Symbolic breakpoint is the one we do use the most. By clicking in the gutter of the source code editor on the line where you want to set a breakpoint

Column Breakpoint

Xcode 13, comes up with new addition to elevate the debugging process. which is Column breakpoint, it can be more useful to those who follow Reactive & Functional Programming.

Reactive Programming with RxSwift
Higher-Order function

Okay, let dive in to interact with the new column breakpoint in action.

ADD:
We can set a column breakpoint directly on the method. Command-clicking on the symbol shows the code actions menu where you can set a breakpoint.

VIEW:
Once after setting the breakpoint, Xcode shows the breakpoint as a small carat at the column in the source code. We can also see the breakpoint in the breakpoint navigator.

EDIT:
We can edit the breakpoint in the same ways as other breakpoints.

  • Tap on the breakpoint to enable or disable.
  • Drag it away to delete the breakpoint.
  • Double-click to edit, add conditions and actions.
  • Control-clicking on the breakpoint shows the breakpoint menu.

ACTION:
When the debugger hits the column breakpoint, the row gets highlighted and compactMap the function gets highlight with a green underscore as we see in the image.

UNRESOLVED:
Xcode won’t pause as this breakpoint if it has not been resolved. To resolve the breakpoint, one must meet the following requirements.

RESOLVE:

  • The compiler generates a location for the expression of the column breakpoint. It is valid to have no such locations.
  • The line at the breakpoint is compiled.
  • The compiler generates debug information that is not stripped out (check the Build Settings).
  • The library for the breakpoint is loaded.

That’s it for this time! 👏👏👏 . Feel free to comment if you have questions and follow to get notifications about future articles.

“Be the senior engineer you needed as a junior.” — Someone

Reference:
https://developer.apple.com/videos/play/wwdc2021/10209

--

--