-
Notifications
You must be signed in to change notification settings - Fork 68
Description
Integrating the Instabug framework will crash the debugger so whenever you want to just print the description of a variable the debugger will respond with "Couldn't IRGen expression, no additional error".
I filled a bug report on Swift's JIRA (https://bugs.swift.org/browse/SR-12783) to ask for a better error reporting when this problem happens but meanwhile there's a reply from one of the developers which explains what the problem is and how to fix it.
Here's the reply:
LLDB could clearly do a better job of surfacing the error — I had to dig it out of the types log:
SwiftASTContext("Instabug")::GetASTContext() – failed to initialize ClangImporter: error: virtual filesystem overlay file '/Users/khaledElMorabea/Library/Developer/Xcode/DerivedData/Instabug-ccnahiryvffhsohhjpovgyeazflu/Build/Intermediates.noindex/ArchiveIntermediates/Instabug/IntermediateBuildFilesPath/Instabug.build/Release-iphonesimulator/Instabug.build/all-product-headers.yaml' not found
The problem here is with the binary Instabug framework that you are using. The .dSYM files that are generated from Swift code are not (yet) as portable as the ones generated from Clang code. The binary Swift module encode a hardcoded path to a yaml file that only exists on the original developer's machine. You should let them know that they need to compile their binary framework with -no-serialize-debugging-options if they are planning to distribute them to another machine.
There is also a sample project attached to that ticket in which you can reproduce the problem.