Appendix C: LLDB Bug
Written by Derek Selander
Heads up... You're reading this book for free, with parts of this chapter shown beyond this point astext.
In LLDB version
1000.11.37.1 (the version that’s packaged with Xcode 10.0), there’s a bug in LLDB that incorrectly imports the wrong headers when debugging an iOS Simulator or iOS target. Fortunately, this bug only appears when running in a Terminal session.
To see if you’re affected, open up a Terminal window and check your LLDB version:
(lldb) version lldb-1000.11.37.1 Swift-4.2
If you have the same version (or maybe one coming from Xcode 10.1/10.2) this will happen when debugging any iOS Simulator application:
(lldb) po @import UIKit error: while importing modules: error: Header search couldn't locate module UIKit
This is because LLDB is looking in the MacOS SDK directory for the
UIKit headers. This also means many LLDB scripts which rely on this feature will also fail.
Fortunately, a solution to this problem can be found here: https://github.com/DerekSelander/lldb_fix