Currently, my Xcode4 does not stop at NSAssert
failure. How can I make it stop at NSAssert
failure again?
Assertions are automatically disabled, by default, in a Release build. If you want assertions to work, do a Debug build, or turn off the Other C Flags build setting where assertions are turned off in the Release build.
Now you will stop in the debugger as soon as NSAssert fires. In my testing, it goes to the nearest source code and doesn't just show you the assembly where you set the breakpoint.
More Generically, you could do this:
This may be more or less useful depending on your code.
See also the XCode 4 documentation result for "Adding an Exception Breakpoint"