Cannot debug Swift module/framework embedded in Objective-C app
<blockquote>
<h1>Alternative titles (to aid searching)</h1>
<ul>
<li>Cannot debug Swift 2.3 framework linked to an Objective-C app in Xcode 8</li>
<li><code>error in auto-import: failed to get module 'XYZ' from AST context</code> Xcode 8</li>
<li>Xcode 8 cannot debug Swift framework</li>
<li><code>warning: Swift error in module &lt;XYZ&gt;</code></li>
<li>Workaround for; Xcode Debugger cannot debug apps written in Objective-C only but that link against frameworks written in Swift only. (28312362)</li>
</ul>
</blockquote>
<p>I have an app written in Objective-C that links against some modules (frameworks) written in Swift 2.x.</p>
<h1>Question</h1>
<p>Everything (debugging etc.) works fine in <a href="/questions/tagged/xcode7" class="post-tag" title="show questions tagged &#39;xcode7&#39;" rel="tag">xcode7</a>, however when moving to <a href="/questions/tagged/xcode8" class="post-tag" title="show questions tagged &#39;xcode8&#39;" rel="tag">xcode8</a> and updating the modules to use <a href="/questions/tagged/swift2.3" class="post-tag" title="show questions tagged &#39;swift2.3&#39;" rel="tag">swift2.3</a> I was unable to debug the modules.</p>
<p>LLDB reported these errors:</p>
<pre><code>warning: Swift error in module XYZ.
Debug info from this module will be unavailable in the debugger.

error: in auto-import:
failed to get module 'ABC' from AST context
</code></pre>
<p>This does not happen if I link the modules to an app built in Swift 2.3.</p>