Explain symbolic breakpoints and debug Auto Layout with one

Tests debugging closed-source frameworks without source lines. A strong answer says a symbolic breakpoint stops on UIViewAlertForUnsatisfiableConstraints, then checks the backtrace or log to find the bad view.
What's really being asked
Your understanding of LLDB and Xcode debugging beyond basic line breakpoints. Specifically, it checks if you know how to stop execution inside Apple frameworks where you do not have source code, and whether you can translate a runtime warning into actionable debugging steps. Senior engineers are expected to diagnose issues without relying solely on print statements or third-party tools.
The full answer
First, a crisp definition: a symbolic breakpoint is a debugger stop set on a symbol name rather than a specific file and line, so it resolves to an address at runtime. Second, the concrete Auto Layout example: you add a symbolic breakpoint for UIViewAlertForUnsatisfiableConstraints with no module restriction so LLDB catches it inside UIKit. Third, the workflow once the breakpoint hits: you inspect the backtrace to find which of your view controllers or methods added the conflicting constraints, then you look at the console output which prints the full constraint ambiguity description. Fourth, the extra trick of running po [[UIWindow keyWindow] _autolayoutTrace] or using the view debugger to visualize the hierarchy and spot the ambiguous layout. Fifth, a brief note on when to use symbolic breakpoints versus exception breakpoints, namely that symbolic breakpoints are precise to a function entry while exception breakpoints catch thrown exceptions broadly.
The mistakes people make
Confusing a symbolic breakpoint with an exception breakpoint is the most frequent error. Another red flag is saying you need the source code for the symbol; symbolic breakpoints work precisely because you do not need it. Candidates who mention UIViewAlertForUnsatisfiableConstraints but cannot explain what to do after the breakpoint hits are also weak; knowing the symbol name is useless without the follow-up investigation. Finally, suggesting you would simply add a line breakpoint inside UIKit framework headers reveals a misunderstanding of how closed-source binaries ship.
What usually comes next
The interviewer might ask how to make the breakpoint conditional, such as stopping only when a specific view is in the hierarchy. They could also ask about the module field and why you might leave it blank or set it to UIKit. Another common follow-up is how to script the breakpoint to automatically run commands like bt or po and continue, turning it into a logging probe. You might also be asked to compare symbolic breakpoints to breakpoint setters on Swift functions with module namespaces.
A concrete example
Imagine a chat app where a message bubble occasionally logs an unsatisfiable constraints warning in the console but does not crash. Instead of guessing which constraint is wrong, you open the breakpoint navigator, tap plus, choose Symbolic Breakpoint, and enter UIViewAlertForUnsatisfiableConstraints with no module condition. You run the app, open the problematic thread, and the debugger pauses deep inside UIKit. You look three or four frames up the backtrace and see your ChatMessageCell configure method. In the console you see the conflicting constraints listed with their priorities and constants. You run po [[UIWindow keyWindow] _autolayoutTrace] and notice the bubble width is ambiguous because you forgot to pin the trailing edge in a reuse path. You fix the missing constraint in configure and the breakpoint no longer fires.
Interview question
Why does a symbolic breakpoint on UIViewAlertForUnsatisfiableConstraints help debug Auto Layout in UIKit?
- a.It behaves like an exception breakpoint but is restricted to Auto Layout warnings only
- b.It automatically prints the full constraint ambiguity description and continues without stopping
- c.It resolves to a runtime address without needing UIKit source code and lets you trace back to your codeCorrect
- d.It pauses execution before the conflict crashes the app, letting you edit constraints in the view debugger
Why? this is the answer
A symbolic breakpoint stops on a function by name inside closed-source UIKit without requiring source code, and the backtrace reveals which of your methods added the conflicting constraints. Distractor D is tempting because both breakpoints halt execution, but exception breakpoints catch all thrown exceptions broadly, whereas a symbolic breakpoint is precisely targeted to a specific function entry.
Just read this? Test yourself on what you have been reading.
Read the original → developer.apple.com
- #ios
- #lldb
- #debugging
- #autolayout
- #uikit
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on ios — each one lists the topics its interview covers.
See open roles