Sorry, this Xcode16 just sucks. I've lost another half a days fiddling around with no luck, I just don't know what to do, and where.
The project is big and in order to recreate the functionality, and the lldb bug, I have to build a whole new project, which will end up resembling the original one, minus some functionalities, so I dropped this route.
The issue appears in one of the projects's internal static library. Now, I pause the execution at some breakpoint, run the "po" command and promptly get the "Couldn't realize Swift AST type of self".
Then I run "swift-healthcheck", check the health log file, find the error below and conclude that the issue is in the static lib "***".
SwiftASTContextForExpressions(module: "***", cu: "AllParts.swift")::LoadOneModule() -- Missing Swift module or Clang module found for "***", "imported" via SwiftDWARFImporterDelegate. Hint: Register Swift modules with the linker using -add_ast_path.
Then I added "-add_ast_path" on the "Other Linker Flags" of the final executable, and now I get an error in Xcode saying "Unknown argument -add_ast_path". The static lib build settings have no "Other Linker Flags", and I don't know where else I should add this flag?!
I mention that the I get a message in the console warning about empty dSYM file, but the executable is built with "DWARF with dSYM File", I triple checked it.
warning: (arm64) /Users/SomeUser/Library/Developer/Xcode/DerivedData/SW-ajoovsaqjdvysgbbrebnfmoxycwm/Build/Products/Debug-maccatalyst/SW.app/Contents/MacOS/SW empty dSYM file detected, dSYM was created with an executable with no debug info.
I'm not sure what you are asking here "Does that file reference UIKit types but is missing an import declaration?". Yes, it uses UIKit types but there is an "import UIKit" directive at the begining of the file where the breakpoint is.