title: How to debug "precondition failure" in Xcode?
body: <p>I'm building a SwiftUI App on Xcode 11 but is terminating immediately whenever I switch to a particular tab in the app.</p>
  
  <p>Thing is, it always points to the <code>Application Delegate</code> file, which I think is not really the problem. I'm also getting this error in the console <code>precondition failure: invalid input index: 2</code> and that's it, no more additional details on what file, array, or function this error is coming from.</p>
  
  <p><a href="https://i.stack.imgur.com/6PRWN.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/6PRWN.jpg" alt="enter image description here"></a></p>
  
  <p>Is there any way in Xcode to isolate which is causing this problem?</p>