Xcode 10, LLDB: Couldn't IRGen expression

xcode couldn t materialize
xcode lldb backtrace
po is not working in xcode
lldb show assembly code
backtrace xcode
xcode call stack
call stack ios
recorded stack frame

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?

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

UPDATE: Another trick that seems to help is to set

LLDB error: Couldn't IRGen expression, no additional error · Issue , Report LLDB error: Couldn't IRGen expression, no additional error Summary: When using Carthage as a Xcode Version: 10.1 (10B61) LLDB is the debugger that powers the variable view in Xcode. You can see the variables you define and their types there. While debugging in Xcode, you can also directly send commands and interact with LLDB through the console in the bottom right of the window.

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

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

Xcode 10 debugger fails to show variable values |Apple Developer , After upgrading to Xcode 10.0 the debugger is failing to perform basic functions. Printing description of x; x = <could not resolve type> Using the (lldb) interface directly, when I try to print a variable, i.e. `po x` to print the  lldb_fix Resolved in Xcode 10.2. This fix only pertains to Xcode 10.0-10.1, no longer needed in Xcode 10.2. Huh? This is a fix which patches LLDB vlldb-1000.11.37.1, which has a nasty little bug that incorrectly imports the wrong SDK when debugging via a Terminal session.

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

Dancing in the Debugger, It's likely that you have used a debugger before, even if only in Xcode's UI to add (lldb) p/x 16 0x10 Awww. LLDB couldn't figure out the types involved. Xcode 9 Xcode 10. Swift Type Resolution. Swift Type Resolution 412_WWDC 2018 Advanced Debugging with Xcode and LLDB_03_D Created Date: 20180608023007Z

For my colleague, carthage update --platform iOS --no-use-binaries was working but it was not for me. When I removed the Carthage folder and reran the command, the po command started working 🎉. I'm not sure if it's related but I'm on macOS Catalina 10.15.3 and he is on Mojave. We both have Carthage version 0.34.0.

Lldb error 1, Xcode could not resolve type from dSYM if build folder is different at <compiler-​generated> Address: DevPod[0x0000000000001e10] (DevPod.__TEXT. (Put "​log enable lldb types -f /tmp/types.log" into ~/.lldbinit-Xcode.). 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.

Xcode could not resolve type from dSYM if build folder is different , 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  This is due to the lldb-mi shipped uses a newer version of the LLDB.framework. We currently decide which lldb-mi to download based on the OS version. But the extension will need to do further checks to see if the XCode version is compatible with it. The workaround for this would be to grab a newer LLDB.framework.

Print lldb, LLDB is the default debugger in Xcode on macOS for supporting C++ on the desktop. One of the most unknown features of LLDB is that you could extend it's and may print invalid data or even temporarily hang LLDB for 5-10 seconds. First of all, Apple introduced new version of Xcode in several WWDC’18 sessions. As you can see in below; Advanced Debugging with Xcode and LLDB; Building Faster in Xcode 10; New Localization

Variable Formatting, Usually, when you type frame variable or run some expression LLDB will description (for C++ this does nothing,: for Objective-C it calls the NSPrintForDebugger API) (lldb) type summary add --summary-string "${var%i​nt32_t[]}" "int [10]" it an expression path just like those you could use for summary strings (one of the  When i try to print something I can only see an error: "error: Couldn't IRGen expression, no additional error". I don't have any problem in earlier verions of Xcode (8,9 etc), but in Xcode 10 GM I can not print anything, when i put breakpoint and try to print for example app (XCUIApplication()) or something like that.

Comments
  • I have the same issue with Xcode 10.1. May be it is related to break point in background thread?
  • @BillChan, I don't think so, In my sample I'm in the main thread.
  • Do you use Carthage? I find a article said if the framework is a binary not locally built.
  • Try fr v variableName
  • imtx.me/archives/2719.html
  • Can you provide more information where you have found it and what it does?
  • @milo Added, hope that helps.
  • Please include the command for carthage that solved the problem in your answer
  • not working for my case. I have added two new targets also.