How to export debugging information for another developer

From time to time, while working in the iOS simulator with the Xcode debugger, I'll experience a non-reproduceable crash. Sometimes that crash occurs in code another developer has been working on, and that developer may be remote.


What are the best options for gathering as much information as possible about a crash in such a way that it can be investigated by another developer? At minimum, is there a way to export the stack traces in text form? A crash report from a device is fine, but in this case I'm already running within Xcode and no crash report seems to be generated.

Answered by DTS Engineer in 92638022

For an OS X app you can use the

lldb.macosx.crashlog
package, as described in Symbolicating with LLDB. I don’t know if this works in the iOS Simulator but it’s worth a try.

Even if it doesn’t work, the package is written in LLDB’s scripting language, Python, so you can crib it for ideas as to how to move forward. If Xcode is installed in the default place, the path is

/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/Python/lldb/macosx/
.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Create an Ad-Hoc build and install it on an actual device.

Then when it crashes, go to Xcode/Windows/Devices/View Device Logs.

You can then copy and paste the crash log into an email or other means of sending the report.

Yes, that works fine, but the problem is when I get an unreproduceable crash in the simulator. Looking for some option there.

Users won't experience a Simulator crash.

The only crashes that are critical are the ones that occur on hardware.

I'd also like to know how. When problems can be reproduced in the Simulator, the debug cycle is much quicker than with devices.

Accepted Answer

For an OS X app you can use the

lldb.macosx.crashlog
package, as described in Symbolicating with LLDB. I don’t know if this works in the iOS Simulator but it’s worth a try.

Even if it doesn’t work, the package is written in LLDB’s scripting language, Python, so you can crib it for ideas as to how to move forward. If Xcode is installed in the default place, the path is

/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/Python/lldb/macosx/
.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

This was very helpful and provides a lot of options for this sort of thing.


On a much more basic level, the obvious solution for how to export the stack traces in text form was "bt" at the "(lldb)" prompt in the debugger, just like gdb. Don't know why I missed that!

How to export debugging information for another developer
 
 
Q