From e491de0a93f0852ae7bcc1df7b665da28e278222 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 419da0abe..f5d4267fa 100644 --- a/Application/AppController.m +++ b/Application/AppController.m @@ -150,7 +150,11 @@ static AppController *kAppController = nil; } - (void)awakeFromNib { +#if DEBUG + [[NSUserDefaults standardUserDefaults] registerDefaults:@{ @"NSApplicationCrashOnExceptions": @(NO) }]; +#else [[NSUserDefaults standardUserDefaults] registerDefaults:@{ @"NSApplicationCrashOnExceptions": @(YES) }]; +#endif [FIRApp configure];