When I use the iOS simulator and the app crashes, I can't find the crash logs. I've been looking all over the internets and can't figure out how to enable them. I know I can just run on an actual device and get the crash logs that way, but the bug I'm trying to fix right now tends to cause the program to be hung in the debugger. Then there's no qlaunchsuccess packet sending and it's a huge pain, especially when I have to run the program over and over. The only advice I've been able to find says the use CrashReporterPrefs, but a search of my hard drive reveals nothing named something even close to this. I've also dug into the package contents of XCode and the files of the iOS simulator. The iOS simulator has a crash logs folder, but it is empty. Anyone know how to get this working? Thanks.
-
If it is crashing in the simulator, why aren't you just using it attached to the debugger? – Dan F Jun 27 '12 at 13:41
-
How do I do that? I almost never use the simulator. – Dustin Jun 27 '12 at 13:43
-
You just open your project in Xcode, and set your run target to the simulator, and hit run. If you're not running it from the debugger, how are you even loading the app into the simulator? – Dan F Jun 27 '12 at 13:44
-
My run target is the simulator – Dustin Jun 27 '12 at 13:46
-
Then you're running attached to the debugger, and you should catch the crashes as they happen – Dan F Jun 27 '12 at 13:47
-
So where does my crash log end up? It isn't showing up in the console or in the crash logs folder. – Dustin Jun 27 '12 at 13:49
-
let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/13114/discussion-between-dan-f-and-cake) – Dan F Jun 27 '12 at 13:49
-
1What happens when the app that’s crashing is, in fact, Mobile Safari? I can hardly attach the process to my debugger, can I? – Alan H. Aug 14 '12 at 20:39
-
@AlanH. then you should use a real device to diagnose. Crash logs are available for real devices. Simulator results are not always accurate. – Raptor Dec 07 '12 at 01:57
3 Answers
- Run your App with Xcode to install the App to iOS Simulator
- Launch your App on Simulator without Xcode
- reproduce steps for crash
the Crash log should show up under this directory
~/Library/Logs/DiagnosticReports/
-
2Best answer; lots of reasons to run in just the Sim, eg. using sim for old version of OS, that won't run under current Xcode. – Gordon Dove Mar 31 '16 at 20:08
-
3
-
It appears if you aren't running Xcode (mine is 4.5.2) but just the simulator (mine is 6.0) that when an app crashes it does save a crash report. To view it bring up the Application/Utilities/Console and
(1) make sure it shows the log list (see top left of console to make sure not hidden)
(2) under "DIAGNOSTIC AND USAGE INFORMATION" there is a "User Diagnostic Reports" that if you open up should have your crash reports
(3) the area on the right of the console has the log

- 689
- 5
- 15
-
1relevant today too - couldn't find the static files for the crash-reports as such; but could see the crash-related info of app on the `Console`-> select device from left pane -> `start` recording from the top-right pane; `Diagnostic Reports` and `Crash Reports` in the left pane were less helpful. – H S Jan 25 '22 at 10:23
A Crash log is just an output of what the debugger already gives you. When you are running in the simulator attached to the debugger, and you hit the crash, you can view the back trace information in the debug navigator (default key binding is cmd+5)

- 17,654
- 5
- 72
- 110