iosexceptionconsolelldbbugsense

Bugsense hiding exceptions in console output in XCode


I'm using Bugsense in my iOS app but when I have a SIGABRT or some crash like that my output console in Xcode only shows Bugsense data without showing the error so every time I'm debugging something I have to disable Bugsense to see it. Here's an example of my output console:

With Bugsense on:

2013-05-29 12:01:45.887 [44604:1303] BugSense --> Posting analytics data...
2013-05-29 12:01:45.949 [44604:c07] GoogleAnalytics 2.0b4 -[GAIDispatcher internalCreateTimer] (GAIDispatcher.m:195) DEBUG: Created timer to fire every 20.0s
2013-05-29 12:01:46.464 [44604:4b03] BugSense --> Server responded with status code: 200

This appears when I launch the app but in the moment of the crash nothing shows on the console output

With Bugsense off:

*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(0x21e5012 0x1dc6e7e 0x21870b4 0x2009d 0x290d8 0x11a5b87 0x11a5c14 0xe0d249 0xe0d4ed 0x18175b3 0x21a4376 0x21a3e06 0x218ba82 0x218af44 0x218ae1b 0x2bdc7e3 0x2bdc668 0xd5dffc 0x254d 0x2475 0x1)
libc++abi.dylib: terminate called throwing an exception

I really have no clue why enabling bugsense hides exceptions.


Solution

  • Bugsense is capturing all exceptions before the debugger ever sees them. Normally you should only enable this kind of framework for builds you give to other people to test or for deployment. For debugging you don't want something hiding the bugs from you.