While trying to debug an AutoLayout problem (a table cell which should be growing according to the size of its content isn't, in some circumstances), I set a breakpoint on the last line of my tableView:heightForRow:
method, and trying to print the value of systemLayoutSizeFittingSize:
I get this:
(lldb) p ((CGSize)[cachedCell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize]).height
2014-10-14 11:15:49.492 AppName[72132:10302054] This NSLayoutConstraint is being configured with a constant that exceeds internal limits. A smaller value will be substituted, but this problem should be fixed. Break on void _NSLayoutConstraintNumberExceedsLimit() to debug. This will be logged only once. This may break in the future.
(CGFloat) $0 = 57
Well ok, that's interesting. But I try and do what it says and set a breakpoint on that function:
... and this breakpoint doesn't get hit.
(Annoyingly, it seems to work in some cases but not in others and I can't see a difference in the setup.)
Omit the ()
from the symbol name. It's a little clearer what is happening if you use the debugger console window to set this breakpoint with the breakpoint set --name
command:
(lldb) br s -n _NSLayoutConstraintNumberExceedsLimit()
Breakpoint 1: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) br s -n _NSLayoutConstraintNumberExceedsLimit
Breakpoint 2: where = Foundation`_NSLayoutConstraintNumberExceedsLimit, address = 0x00007fff9168e6f5
(lldb)
If you had used the breakpoint list
(br l
) command in your Xcode debug session, you would have seen that the _NSLayoutConstraintNumberExceedsLimit()
breakpoint didn't get set in any locations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With