Forum Xamarin.iOS

Debugging Autolayout issues

candersoncanderson USMember ✭✭

In my app I occasionally get "[LayoutConstraints] Unable to simultaneously satisfy constraints" in my log and it suggests:

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.

Is there a way to do this in Visual Studio?


  • LandLuLandLu Member, Xamarin Team Xamurai

    This log occurs because you have added conflict constraints. According to this detailed post: we can track it by adding a UIViewAlertForUnsatisfiableConstraints breakpoint on XCode. But unfortunately it seems Visual Studio doesn't support this symbolic breakpoint.
    However the log must have included other detailed messages. i.e.

    Will attempt to recover by breaking constraint
    NSLayoutConstraint:0x600000340230 UIButton:0x7fe1a853b290'Button'.width == 200 (active)>

    This is what my output window throws when I simulate a constraint error. System will point out which control has the conflict constraints. Read the error messages more carefully and you will figure out the wrong constraints.

Sign In or Register to comment.