LLDB error: type for self cannot be reconstructed: type for typename

All is fine in Xcode15, no LLDB errors whatsoever, but in Xcode16 I can't get any variable displayed in the console because of the following error:

error: type for self cannot be reconstructed: type for typename "$......." was not found (cached)
error: Couldn't realize Swift AST type of self. Hint: using `v` to directly inspect variables and fields may still work.

I've checked the output of swift-healthcheck and there are several messages like this:

SwiftASTContextForExpressions(module: "ROA", cu: "ROA+ViewLayer.swift")::LoadOneModule() -- Missing Swift module or Clang module found for "UIKit", "imported" via SwiftDWARFImporterDelegate. Hint: Register Swift modules with the linker using -add_ast_path.

I added -add_ast_path to the OTHER_LDFLAGS in the faulty module's build settings but no luck.

How can I debug my project in Xcode16?

What's unique about the ROA+ViewLayer.swift file? Does that file reference UIKit types but is missing an import declaration? And if you look at the ROA module, how is it built in terms of frameworks it references, its dependencies, its use of UIKit, and so on? If you were to place that module into a brand new Xcode project and reference it from the new project, do you get the same results from the health check?

— Ed Ford,  DTS Engineer

LLDB error: type for self cannot be reconstructed: type for typename
 
 
Q