2

I am using the latest Xcode, and have placed NSAssert() calls inside of my code. When one of the assertions fails, execution halts, and the console log states that an assertion error has occured, but the message in the NSAssert() call does not show up in the console log. For instance:

NSAssert( 1 != 1, @"Foo bar." );

Will not cause the message "Foo bar." to show up in the console log. It is my understanding that it should. Any ideas what might be going on?

jscs
  • 63,694
  • 13
  • 151
  • 195
dqhendricks
  • 19,030
  • 11
  • 50
  • 83
  • :) Ok, your usage looks fine at this point. I'm confused, too. – Almo Jan 08 '13 at 22:35
  • See [here](http://stackoverflow.com/a/12268397/581994). It's a bug in the simulator. – Hot Licks Jan 08 '13 at 23:01
  • @HotLicks I don't think assert failures throw an exception? in any case the proposed solution does not work for showing assert failure messages. – dqhendricks Jan 09 '13 at 00:13
  • Pretty sure that an assert failure eventually turns into an exception. Of course the other thing to do is to put a breakpoint in the exception handler -- Click "+" at the bottom of the breakpoint screen and select the option to enable exception breakpoints. – Hot Licks Jan 09 '13 at 00:32

0 Answers0