How to fix Xcode 10.0 debugger, it is not fully functioning?

社会主义新天地 提交于 2019-12-10 01:28:59

问题


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.

Symptoms:

  • 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.

Attempted fixes:

  • 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

回答1:


I upgraded my Cocoapod version to 1.6.0.beta.2 and my debugger works now. Seems like CommonCrypto is the causing the issue




回答2:


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.




回答3:


I was using Carthage and had the same problems. Updating my dependencies with this command resolved the problem for me:

carthage update --platform iOS --no-use-binaries



回答4:


In my case, I removed Fabric, Crashlytics, Firebase/Core from Cocoapod, and everything is fine.

Xcode 10.0

pod 'Fabric', '~> 1.9.0'

pod 'Crashlytics', '~> 3.12.0'

pod 'Firebase/Core'



来源:https://stackoverflow.com/questions/52728986/how-to-fix-xcode-10-0-debugger-it-is-not-fully-functioning

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!