How can I print out a Swift variable's value in XCode 6 GM with LLDB? It seems to be broken since early betas. But at the same time po
works perfectly fine in Objective-C code
I've previously tried all XCode 6 betas and got the same result. Even when I start a new project from scratch it's all the same. For example, I put a breakpoint in func application(application, didFinishLaunchingWithOptions)
(lldb) po application
error: Error in auto-import:
Failed to load linked library Metal of module sandbox - errors:
Looking for "@rpath/Metal.framework/Metal", error: not a string object
I've never imported or linked against Metal.framework in any of my projects. Does there exist any way to solve this?
Don't know the reason that po is broken in xCode 6, but I am able to print an object by
Right clicking an object in the Debug Area
and clicking -> Print Description of "OBJECT_NAME"
Hope this will help someone else, until the xCode bug is fixed
The bug was fixed in XCode 6.1
Resolved Issues - Debugging
Swift expressions like 'expr', 'p', and 'print' that are evaluated from the LLDB prompt in the debugger console will now work on 32-bit iOS devices. (18249931)
https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/Chapters/xc6_release_notes.html
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