Cannot inspect variables with “po” in my Swift 2 project using Xcode 7.3.1
| Originator: | franco | ||
| Number: | rdar://26760600 | Date Originated: | 06-Jun-2016 |
| Status: | Open | Resolved: | |
| Product: | XCode | Product Version: | 7.3.1 |
| Classification: | Reproducible: | Always |
Summary:
When I run my Swift app in Xcode 7.3.1 (with standard Swift 2 compiler) and execution pauses at a breakpoint, I cannot inspect variables with po command. The first time I run po exists (exists is a non-optional Bool variable in current scope) I get a long error message (see below). From the second time I run the same command onwards, I receive error loading helper function: (null) message.
The app is compiled and run on the debug scheme, with no "deployment post processing" and None [-O0] optimization.
Variable contents appear correctly in the variable inspector panel of Xcode.
Same error appears with po self or any other variable both running on device and iOS simulator.
If I run a new clean project, debugging with po works correctly.
Steps to Reproduce:
Create a breakpoint in application.willFinishLaunchingWithOptions. Build and run debug scheme. Execute "po self" or "po exists" in LLDB. (exists is a valid non optional Bool variable)
Expected Results:
The address or the contents of the variable should be printed.
Actual Results:
The following error is displayed in LLDB:
po exists
error loading helper function: <EXPR>:141:9: warning: '--' is deprecated: it will be removed in Swift 3
--maxItemCounter
^~
-= 1
<EXPR>:237:14: warning: '++' is deprecated: it will be removed in Swift 3
i++
^~
+= 1
<EXPR>:267:19: warning: 'init(start:end:)' is deprecated: it will be removed in Swift 3. Use the '..<' operator.
let rng = Range(start: si, end: ei.advancedBy(-1))
^
<EXPR>:280:9: warning: initialization of variable '$__lldb_error_result' was never used; consider replacing with assignment to '_' or removing it
var $__lldb_error_result = __lldb_tmp_error
~~~~^~~~~~~~~~~~~~~~~~~~
_
<EXPR>:89:41: error: 'CustomStringConvertible' is ambiguous for type lookup in this context
if let csc = (x as? CustomStringConvertible) {
^~~~~~~~~~~~~~~~~~~~~~~
Swift.CustomStringConvertible:13:17: note: found this candidate
public protocol CustomStringConvertible {
^
Castamatic.CustomStringConvertible:1:17: note: found this candidate
public protocol CustomStringConvertible {
^
<EXPR>:101:41: error: 'CustomStringConvertible' is ambiguous for type lookup in this context
if let csc = (x as? CustomStringConvertible) {
^~~~~~~~~~~~~~~~~~~~~~~
Swift.CustomStringConvertible:13:17: note: found this candidate
public protocol CustomStringConvertible {
^
Castamatic.CustomStringConvertible:1:17: note: found this candidate
public protocol CustomStringConvertible {
^
(lldb) po exists
error loading helper function: (null)
(lldb)
Version:
Xcode 7.3.1 (7D1014)
OS X 10.11.5
Notes:
Configuration:
Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!