3 Replies
      Latest reply on Dec 19, 2018 12:27 AM by alcod47
      Ultr4Dave Level 1 Level 1 (0 points)

        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.






        - Breakpoints **are** breaking properly

        - The "local variables" area (not sure if this is the proper term) lists local variables but cannot provide any info on them. Attempting something like "Print description of x" The result is an error message:


        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.



        <h3>Attempted fixes:</h3>

        - I've tried re-cloning my repository in a new location to import a new workspace in a new location.

        - Deleted DerivedData and rebooted Xcode many times

        - Uninstalled and re-installed Xcode

        - Cleaned and re-built everything

        - Restarted computer

        • Re: Xcode 10 debugger fails to show variable values
          Ultr4Dave Level 1 Level 1 (0 points)


          In the case of my project, it was caused by the inclusion of a [CommonCrypto][1] 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.

            • Re: Xcode 10 debugger fails to show variable values
              alcod47 Level 1 Level 1 (0 points)

              I'm facing the same issue in a framework. I'm building a framework with both Obj-C and Swift code.  I'm integrating this framework into an App using cocoapods by mentioning a local path in the podfile.


              When I run the app, If I put breakpoints in swift files in the framework, I'm not able to see the variable values. But If I put breakpoints in Obj-C files everything works fine. The breakpoints work fine even in swift files in the app. It's only the swift files in the framework.


              I've tried everything you mentioned and I'm not using CommonCrypto framework. Any help would be appreciated.

              • Re: Xcode 10 debugger fails to show variable values
                alcod47 Level 1 Level 1 (0 points)

                Can you give me any pointers on how to find the culprit framework? I'm not using commoncrypto, but if you can tell me where to look that will be very helpful.