Why am I unable to view values in debug area?

Viewed 483

After adding an expression -in the debug area-:

enter image description here

I am facing an issue, which is: when reaching the desired line (via a breakpoint), the value is always appears as "Invalid expression", with a message logged to the console:

Shared Swift state for (My Project Name) has developed fatal errors and is being discarded.

REPL definitions and persistent names/types will be lost.

To double check that the variable has a value (also as a workaround to see what is the actual value of the variable), I tried to log it via dump() and it seems that it does has a value.

Although there is a workaround -as I mentioned, by using dump()-, I wonder what is the reason of causing this issue?

I am not pretty sure if it could be a bug in the Xcode; I am using Xcode version 8.3.2.


Remark: If you have no idea what is adding an expression into the debug area, you might want to check this Q&A.

0 Answers
Related