After upgrading to Xcode 10.0 the debugger is failing to perform basic functions. It's possible the debugger problems are unrelated to the upgrade to 10.0 but I suspect this as the catalyst.
Printing description of x x = <could not resolve type>
Followed by:
note: Swift compiler options for ProjectX conflict with options found in other modules; Switching to a new expression evaluator for ProjectX, old $R variables are lost.
when selecting "view memory of x" for any given variable, the "memory view" appears, but the address is "0x0" and there is absolutely zero content in the view.
Using the (lldb) interface directly, when I try to print a variable, i.e. po x
to print the variable "x" I'm first given the message above about switching to a new expression evaluator, but upon second execution of the same print command po x
, a different error is presented as
error: Swift expressions require OS X 10.10 / iOS 8 SDKs or later.
Yes, I am on OS X 10.13 and my iOS SDK is 12.0 and I've simulated various devices iPad 6, pro 2, air 2, iPhone X, debugger has exact same symptoms on all devices.
When you run an application in Xcode, the debugger is automatically started and attached to the process of the application. Click the Run button in the top left or press Command + R. From the moment the application is up and running, we can start inspecting the process and, if necessary, debug it.
If the variable is an image or other type that isn't expressible as text, click the Quick Look button at the upper-right to see a preview of the variable. Click the Print Description button to print a description of the object in the console.
Evaluate a C/ObjC/C++ expression in the current program context, using user defined variables and variables currently in scope. This command takes 'raw' input (no need to quote stuff). -G <gdb-format> ( --gdb-format <gdb-format> ) Specify a format using a GDB format specifier string.
I upgraded my Cocoapod version to 1.6.0.beta.2 and my debugger works now. Seems like CommonCrypto is the causing the issue
Fixed
In the case of my project, it was caused by the inclusion of a CommonCrypto wrapper which was included as a framework in one of my modules. From what I understand, this caused some conflict with the crypto modules now included with iOS
This is a long-lived project and this CommonCrypto framework is now deprecated for us by the facilities provided in more recent Apple frameworks. With the CommonCrypto framework removed debugging started working again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With