28
[Off-Topic] Easily Debugging Errors in Xcode
Posted on March 28, 2011
This little tip has saved me a few hours debugging errors and I wonder why Xcode doesn’t come with it pre-configured already (if it does, let me know). I found it in a Stackoverflow thread and I will just reproduce it here.
In Xcode, go to “Run – Show – Breakpoints”. Then select the “Global Breakpoints” and add 2 breakpoints:
- “objc_exception_throw” for Location “libobjc.A.dylib”
- “-[NSException raise]” for Location “CoreFoundation”
You should have it like this screenshot:

Now everytime an unexpected crash happens, you can open the Console (at menu “Run – Console”) and type “bt” (I think it means “backtrace”) and it will show you the trace dump so you can pinpoint the exact file and line number where the crash took place and add safe guards to avoid that particular crash.
blog comments powered by Disqus
Archives
- February 12(2)
- December 11(1)
- November 11(4)
- October 11(6)
- September 11(5)
- August 11(1)
- July 11(5)
- May 11(4)
- April 11(11)
- March 11(4)
- February 11(3)
- January 11(4)
- December 10(9)
- November 10(2)
- October 10(10)
- September 10(4)
- August 10(6)
- July 10(14)
- June 10(16)
- May 10(8)
- April 10(14)
- March 10(9)
- February 10(6)
- January 10(14)
- December 09(10)
- November 09(10)
- October 09(7)
- September 09(19)
- August 09(4)
- July 09(12)
- June 09(7)
- May 09(12)
- April 09(11)
- March 09(9)
- February 09(9)
- January 09(12)
- December 08(14)
- November 08(20)
- October 08(15)
- September 08(18)
- August 08(25)
- July 08(13)
- June 08(21)
- May 08(29)
- April 08(27)
- March 08(12)
- February 08(32)
- January 08(31)
- December 07(27)
- November 07(30)
- October 07(25)
- September 07(28)
- August 07(16)
- July 07(15)
- June 07(16)
- May 07(7)
- April 07(13)
- March 07(8)
- February 07(9)
- January 07(24)
- December 06(17)
- November 06(17)
- October 06(15)
- September 06(38)




