Xcode 10, LLDB: Couldn't IRGen expression

2019-04-08 18:21发布

问题:

Using Xcode 10, when I stop my app using a breakpoint and try to print the content of an object in the Console, I obtain:

"Couldn't IRGen expression, no additional error"

However, I can see the value of the object in the Variables View panel.

How can I make it evaluate my expression instead?

回答1:

In lldb as a workaround you can use:

fr v productVersion
fr v productBuild

which prints local variable type and address from current call stack frame.

Apple documentation for these kind of lldb capabilities: https://developer.apple.com/library/archive/documentation/General/Conceptual/lldb-guide/chapters/C5-Examining-The-Call-Stack.html



回答2:

Thanks. I solved with rebuild carthage framework like imtx.me/archives/2719.html

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



回答3:

I had defined as build system: "Legacy Build System", I changed it to "New Build System", then I build the project, and then I put it back as "Legacy Build System" and it worked again.

For to change the build mode: File->Workspace settings...->Build System