From 112366c850f9e486c19f411575b7879b8005e39e Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Tue, 28 Jun 2022 20:22:51 -0700 Subject: [PATCH] [Crash Handling] Enable exceptions for debugging Debug builds should have exceptions enabled, rather than crashing. Signed-off-by: Christopher Snowhill --- Application/AppController.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Application/AppController.m b/Application/AppController.m index 3520dbe59..df2df7dbd 100644 --- a/Application/AppController.m +++ b/Application/AppController.m @@ -152,7 +152,11 @@ static AppController *kAppController = nil; } - (void)awakeFromNib { +#if DEBUG + [[NSUserDefaults standardUserDefaults] registerDefaults:@{ @"NSApplicationCrashOnExceptions": @(NO) }]; +#else [[NSUserDefaults standardUserDefaults] registerDefaults:@{ @"NSApplicationCrashOnExceptions": @(YES) }]; +#endif [FIRApp configure];