Xcode stack trace not appearing in console - ios

I am used to having a stack trace appear in the console when I don't catch an exception and it throws it back to the main function. Is there a build setting somewhere in Xcode 4.2 that I don't have on? Right now, it shows nothing in the console at all.

Try adding a breakpoint on exception.
Click on the breakpoint's tab (cmd + 6)
Click the add ('+') button bottom left.
Click 'Add Exception Breakpoint...'
Leave the defaults and click done.
Now when an exception is thrown it should drop you into debugger at the line that throws the exception.

This is usually indicative of a problem with LLDB (debugger). I love LLDB, but when it comes to showing stack traces and breaking on the exception rather than main in iOS apps, it's a pain in the ass and has been for a few releases now. No idea why Apple hasn't addressed this yet. To fix it is a two-step process:
Edit your current scheme and under the "Run" tab change the debugger from LLDB to GDB.
Go to https://developer.apple.com/bugreporter/ and report the bug so Apple addresses it.

Related

Causes of CFDictionaryGetValue crash?

I'm having random crashes within my swift app and they are all throwing a similar error around CFDictionaryGetValue
Here are two screenshots from my Google Crashlytics showing the error and that its effecting to different URLs, Note these are from two separate crashes
Then here is also a screenshot directly from within Xcode where I was able to reproduct the error:
There doesn't seem to be any specific action that causes this issue and it occurs at random times.
And advise for trying to trace it and debug would be much appreciated!
Thanks
Oliver
As it turns out this issue was caused by a bug within the Firebase Performance SDK. After removing the SDK everything is working as expected
https://github.com/firebase/firebase-ios-sdk/issues/6734?fbclid=IwAR0L5U4dsBjyUGmklr8qEohlKTyY7P6zJwzWUnU3dUTnFmb0aclK4-rt5os
Try setting up an Exception breakpoint, it would probably give you more information to help you debug it:
In Xcode:
Go to Breakpoint Navigator (CMD+8)
Click the + button in the bottom left corner of the navigator and then choose Exception Breakpoint...
Select All in the Exception field
Re-run your app and you should get clearer information in the debugger

How do I debug a Thread 1: signabrt, debug console doesn't show any logs

My ios project builds and installs on the device but has a runtime crash after launcher screen finishes.
I'm looking in the debugger console but I don't see any logs to help me diagnose what is going on. My project was working correctly before I upgraded react-native-firebase from v3 to v4 https://github.com/invertase/react-native-firebase/releases. Stepping into or over the code doesn't show me any errors in the code itself.
I'm hesitant to log an issue with the react-native-firebase project before I understand what the error could be - and whether it was a simple error somewhere.
However, the error seems pretty cryptic and I don't have any clues on what's actually causing the runtime crash. Is there a way that I can read more verbose logs that might give more info on the crash?
add an Exception breakpoint: by going to the breakpoint tab (command + 8) and the click the add "+" button on the bottom left corner and click on Exception breakpoint - all exceptions.
That will pause the code exactly were the exception is being raced therefore you will be able to see the line of code that it is causing the crash.

Xcode: App quits without error

I'm having a weird bug on Xcode (6.1.1). My app is exiting without an error. It's the same behavior that happens when we click on the stop button on Xcode. It seems that the exit() method is being called, but it's not. I already added an exception breakpoint, but could not find anything.
Any tips?
Have you tied to read the registers by putting an exception breakpoint.
Go to Exceptions tab and click on 'Add Exception Breakpoint' using the + at the bottom left corner.A crash with no error can be the source of lot's of consequences such as memory issue.

Xcode console wont show error details

I have been developing iOS applications for about 2 years and have never come across this before.
I recently took on a project, but for some reason whenever it crashes while I am debugging the console shows no details about the error. The code highlights with a SIGABRT or ESC_BAD_ACCESS but never tells me the details of the crash in the console (like unrecognised selector sent to instance etc.)
I've come to the conclusion this is a problem with the project settings as I test other apps with the same xCode and don't have the same problem.
I've looked all over but can't find anyone with a similar problem please help!
Try adding an Exception breakpoint:
Open the breakpoint navigator and click the + icon and add an exception breakpoint
Add a breakpoint with the settings as shown
I don't think this is an Xcode problem. But try this two options:
1) In your VC or AppDelegate perform crash on purpose for example:
[self performSelector:#selector(methodNameNotExistingInMyProject:) withObject:nil];
This should return you some console output
2) Are you sure you have Debug configuration in scheme? You may want to check it out.

Seeing exception information in AppCode

I've been testing AppCode and I can't seem to find any information as to WHY an app is crashing.
I've added an exception breakpoint and I can see the line of code causing the crash but no info on why.
In Xcode the exception reason is printed into the console but in AppCode I just get "Exception = Exception Breakpoint".
Can someone point me in the direction of getting useful information out of the crash.
AppCode, Choses Run, View Break points settings, Click on "Log message to console" by default it is off.
Command liners use, shift-fn-command-f8
AppCode also prints the exception in the console, providing that you launch the app in debug mode (as, actually, the debugger does it).

Resources