Are there any crash logs generated by iPhone Simulator?
the Simulator crashes a lot but not leaving any traces in Console... the crash log will be useful.
This is much more reliable. In only a few steps I was able to find the source line number & method name:
I am pretty sure that you can see this in the OS X Console app located in Utilities. If I'm wrong though, be sure to vote me the heck down so I delete this.
UPDATE:
Specifically (as of OSX 10.11.6),
When an app crashes on emulator, a subfolder (with a unique id) is added to:
~/Library/Logs/CoreSimulator
Within that, start by examining stderr.log
and system.log
.
When the emulator itself crashes, a subfolder is added to:
~/Library/Logs/DiagnosticReports
Don't confuse this path with
/Library/Logs
(lacking ~
at start), which has different reports about your mac.
The crash crash logs will appear under ~/Library/Logs/CrashReporter.
When Xcode gets crash logs from a connected device, it stores them in sub-folders of ~/Library/Logs/CrashReporter/MobileDevice
You may also want to take a look at this related answer: https://stackoverflow.com/a/14984297/679240
None of the answers above worked on the "Big Sur" OS version. The only way to find the log was through the "Console" app (Application/Utilities/Console)
For me, it was an expression that I had added to the debugger watch window. When a breakpoint was getting hit, the bad expression was causing XCode to segfault.
The console will show the NSLog()
output from an app running in the simulator. The crash logs are saved to file.
I have found some in my home directory under
~/Library/Logs/DiagnosticReports/
They have a file extension of .crash
Something I haven't yet figured out is how to get them to generate even if the debugger grabs the EXC_BAD_ACCESS
signal.
Update
Currently, (OSX 10.11.6), the .crash logs in ~/Library/Logs/DiagnosticReports
, are when the emulator itself crashes. Logs for an app crashing (but the emulator device is still running fine), are in:
~/Library/Logs/CoreSimulator
Per crash, there is a sub-folder with a unique id. Sort by date, so that your recent crash is the first sub-folder. Inside that, start by looking at stderr.log
and system.log
.
Also directly under CoreSimulator
, see CoreSimulator.log
and Simulator.log
.