I think I found the root of the problem.
In dSYM there is an absolute path to the source framework.
It can be detected by executing this command or using MachOView:
dwarfdump -a DevPod.framework.dSYM/Contents/Resources/DWARF/DevPod | grep DevPod.framework
Example output:
0x0000227d: "/Users/username/DD/DevPod-gebvdrztdkfjfphimqjdufcsdetc/Build/Products/Debug-iphonesimulator/DevPod.framework"
At the same time, the build of the main application occurs in a different folder:
/Users/username/DD/DebugProblemApp-fucfslzxpotphfeaohzvxfbkkvkh/Build/Products/Debug-iphonesimulator/DebugProblemApp.app
/Users/username/DD/DebugProblemApp-fucfslzxpotphfeaohzvxfbkkvkh/Build/Products/Debug-iphonesimulator/DevPod/DevPod.framework // The framework that is linked to the application.
/Users/username/DD/DebugProblemApp-fucfslzxpotphfeaohzvxfbkkvkh/Build/Products/Debug-iphonesimulator/DevPod/DevPod.framework.dSYM // dSYM that I check ( dSYM that is loading )
Important: Before each launch, you need to kill the lldb-rpc-server process so that the information from dSYM is not cached.
If the framework also exist in path from dSYM at the time of loading the dSYM, then everything works (except the problem below). At the same time, all other files (artifacts of the framework build) can be deleted (except the problem below).
After that I tried to find out which files from the framework are needed.
After removing files from the framework, I realized that the following files are needed:
/Users/username/DD/DevPod-gebvdrztdkfjfphimqjdufcsdetc/Build/Products/Debug-iphonesimulator/DevPod.framework/Headers/DevPod.h
/Users/username/DD/DevPod-gebvdrztdkfjfphimqjdufcsdetc/Build/Products/Debug-iphonesimulator/DevPod.framework/Headers/DevPod-Swift.h
/Users/username/DD/DevPod-gebvdrztdkfjfphimqjdufcsdetc/Build/Products/Debug-iphonesimulator/DevPod.framework/Modules/module.modulemap
If one of these files is missing, the types will not be displayed. All other files are not important (except the problem below).
This is true for Swift 4.2 and Xcode 10.1 - Xcode 10.2.
About DevPod.framework/Headers/DevPod-Swift.h. I can disable the generation of this file using the flag SWIFT_INSTALL_OBJC_HEADER == NO. I'm not sure that this is a good idea, and the problem is not fixed with the other files. After this check, I returned the flag to its former state.
Then I realized that these files are important too. (All other files can also be deleted.)
/Users/username/DD/DevPod-aujdjllyhepdvcbapusozbgvtvlj/Build/Intermediates.noindex/DevPod.build/Debug-iphonesimulator/DevPod.build/all-product-headers.yaml
/Users/username/DD/DevPod-aujdjllyhepdvcbapusozbgvtvlj/Build/Intermediates.noindex/DevPod.build/Debug-iphonesimulator/DevPod.build/module.modulemap
If these files do not exist, the command (lldb) po self will display an error: error: Couldn't IRGen expression, no additional error.
But at the same time, the debug panel works and the other command works:
(lldb) frame variable
(DevPod.DevPodViewController) self = 0x00007fefa5f033d0 {
UIKit.UIViewController = {
...
Found out the dependencies between these files.
If I delete or rename only all-product-headers.yaml file, then the behavior described above is reproduced ( about Couldn't IRGen expression ).
If I delete or rename another file - Build/Intermediates.noindex/DevPod.build/Debug-iphonesimulator/DevPod.build/module.modulemap and all-product-headers.yaml, then the behavior will be the same as in the initial problem - debug panel does not display types and (lldb) po self return error: <EXPR>:3:1: error: use of unresolved identifier 'self'.
What is the reason for this behavior, I do not understand.
Just in case, I note that the framework pointed to by the dSYM, the framework with which the applications are linked and the framework that moves into the application are absolutely identical (copies). All necessary headers and modulemap files exist in all copies of the framework.
I saved all the logs of various situations - link
I hope there is a solution.
P.S.: I also slightly updated the scripts in the demo project, if it caused problems, maybe it was fixed.