Why does NSAssert break in main instead of in the code that call the assertion

后端 未结 2 595
隐瞒了意图╮
隐瞒了意图╮ 2020-12-21 13:13

I set this NSAssert

NSAssert(isStillLoadingArgument== [[self class] stillLoading],@\"Hmm.... we think isStill Loading is false or true and yet stillLoading i         


        
2条回答
  •  礼貌的吻别
    2020-12-21 13:56

    You need to add a Breakpoint to your project for all exceptions.

    1) Click on breakpoint navigator

    Breakpoint

    2) Add an exception breakpoint

    Exception

    3) Make sure you set it to break on all exceptions

    All

    Now XCode will break to the actual assert rather than main. Hope this helps!

提交回复
热议问题