Wednesday, December 29, 2021 [Tweets] [Favorites]

Disabling Exception Breakpoint When Running Unit Tests

Brian Webster:

The problem is that I usually have Xcode’s built-in “All Exceptions” breakpoint enabled when debugging my application, but when I run unit tests in Xcode, I have certain unit tests that will throw exceptions and trigger the breakpoint, halting the test until I tell it to continue.

[…]

[Open] up the breakpoints navigator in Xcode, right-click on the exceptions breakpoint, and add !BWIsUnitTesting() to the “Condition” field[…]

Comments

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment