When I'm running a unit test and want to debug something, I set a breakpoint and type for instance "po myVariable". The response I get from LLDB is:
error: Couldn't IRGen expression, no additional error
Example:
I have the smallest little unit test defined here:
class MyExampleTests: XCTestCase {
func testLLDB() {
let world = "World"
print("Breakpoint goes here")
print("Hello \(world)")
}
}
I set my breakpoint in "Breakpoint goes here", and when I run, I do 'po world':
(lldb) po world
error: Couldn't IRGen expression, no additional error
Any suggestions to how I can make it evaluate my expression instead?
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