LLDB: Couldn't IRGen expression

I was having the same issue using Carthage frameworks, and got the LLDB debugger working again by deleting the Carthage folder in the project root and forcing Carthage to rebuild the frameworks from source:

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

You are likely getting this error because you are setting a breakpoint in another project/framework/module.

Instead of po world, the quickest solution is to use the following command:

fr v world

edit:

Since this answer gets some attention, please note that it describes just a quick fix.
If you encounter the problem frequently, check the other answers for a more permanent solution.
For me, cleaning the build folder did the trick.
Edit 2: Cleaning doesn't help in some cases, carthage update --platform iOS --no-use-binaries always does for me.

original answer:

I have a quick and dirty solution that makes this work.

  • select the first accessible frame in your debug navigator, usually mainenter image description here

  • type something in the debugger, for example po self

  • select the original frame in the debug navigator and execute your command, it should work now

I don't know why it works, but it does for me. I just found out by chance.
I'd be interested to hear an explanation from somebody with more insights (I am using Carthage in my project).

Tags:

Ios

Xcode

Lldb