LLDB throwing auto import error in Swift Xcode pro

2019-03-17 21:43发布

问题:

I'm trying to use the debugger in Xcode to poke around in one of my methods. The app is pretty bare bones, just one example class at this point. When I set a breakpoint and run, the LLDB debugger pane opens in Xcode as expected. However, if I try to execute a print command to poke around in my method, I get the following error:

Error in auto-import:
Failed to load linked library Cocoa of module ExampleAppTests - errors:
Looking for "@rpath/Cocoa.framework/Cocoa", error: not a string object
Looking for "/Users/Elliot/Library/Developer/Xcode/DerivedData/ExampleApp-aqpflidffjffyzdxfjdfbjijvsxq/Build/Products/Debug/Cocoa.framework/Cocoa"
,    error: not a string object
Looking for "/BinaryCache/arclite/arclite-49.1~7/Symbols/BuiltProducts/Cocoa.framework/Cocoa"
,    error: not a string object
Looking for "/Applications/Xcode6-Beta6.app/Contents/Developer/Library/PrivateFrameworks/Cocoa.framework/Cocoa"
,    error: not a string object
Looking for "/Applications/Xcode6-Beta6.app/Contents/Developer/Library/Frameworks/Cocoa.framework/Cocoa"
,    error: not a string object
Looking for "/Applications/Xcode6-Beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/Cocoa.framework/Cocoa"
,    error: not a string object
Looking for "/Applications/Xcode6-Beta6.app/Contents/SharedFrameworks/Cocoa.framework/Cocoa"
,    error: not a string object

I get the same error if I enter the repl and execute a command.

回答1:

Hemal from Crashlytics here! We reached out to Apple on the behavior that everyone is seeing and they confirmed it's a bug in LLDB around Swift. We don't have an firm timeline yet as to when it will be fixed, but the bug report that it's being tracked in is 18256812.



标签: xcode swift lldb