{"id":34571,"date":"2021-12-29T15:23:28","date_gmt":"2021-12-29T20:23:28","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=34571"},"modified":"2021-12-29T15:26:37","modified_gmt":"2021-12-29T20:26:37","slug":"disabling-exception-breakpoint-when-running-unit-tests","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2021\/12\/29\/disabling-exception-breakpoint-when-running-unit-tests\/","title":{"rendered":"Disabling Exception Breakpoint When Running Unit Tests"},"content":{"rendered":"<p><a href=\"https:\/\/brian-webster.tumblr.com\/post\/632528822118629376\/disabling-exception-breakpoint-when-running-unit\">Brian Webster<\/a>:<\/p>\n<blockquote cite=\"https:\/\/brian-webster.tumblr.com\/post\/632528822118629376\/disabling-exception-breakpoint-when-running-unit\">\n<p>The problem is that I usually have Xcode&rsquo;s built-in &ldquo;All Exceptions&rdquo; 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.<\/p>\n<p>[&#8230;]<\/p>\n<p>[Open] up the breakpoints navigator in Xcode, right-click on the exceptions breakpoint, and add <code>!BWIsUnitTesting()<\/code> to the &ldquo;Condition&rdquo; field[&#8230;]<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Brian Webster: The problem is that I usually have Xcode&rsquo;s built-in &ldquo;All Exceptions&rdquo; 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. [&#8230;] [Open] up the breakpoints navigator [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2021-12-29T20:23:31Z","apple_news_api_id":"ed854cc7-a4c8-468b-9804-617a05e18f3e","apple_news_api_modified_at":"2021-12-29T20:26:40Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/A7YVMx6TIRouYBGF6BeGPPg","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[56,30,2077,54,71,268,226],"class_list":["post-34571","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-debugging","tag-mac","tag-macos-12","tag-objective-c","tag-programming","tag-testing","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=34571"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34571\/revisions"}],"predecessor-version":[{"id":34572,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34571\/revisions\/34572"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=34571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=34571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=34571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}