[swift-users] How to debug Xcode: "An internal error occurred. Source editor functionality is limited"

Brent Royal-Gordon brent at architechies.com
Fri Apr 7 22:58:33 CDT 2017

> On Apr 7, 2017, at 11:21 AM, Jesse Grosjean via swift-users <swift-users at swift.org> wrote:
> Does anyone recognize the below stack and know what might be causing that
> particular crash? Is there any way to log what file the SourceKitService is
> working on, so I can see what it's doing before the crash?
> After manually going through all my code and individually adding files back to the project I've found (fingers crossed!) a fix. I don't understand all the conditions neccessary, but the problem is related to defining class extensions in files separate from where the class is originally defined.
> So I didn't change any code to fix the problem, but I did move a number of class extensions out of separate files and just append the extensions text to the end of the original file where the class was defined.
> Hope this helps someone to avoid all the fun I just went through!

If you can reduce this down to a small test case, and especially if you get the same crash when you try to compile your code, it'd be very helpful if you could file a bug at bugs.swift.org. The compiler's repository has a big folder full of examples that crash it, and we do get around to fixing them!

Brent Royal-Gordon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170407/a0d6d68a/attachment.html>

More information about the swift-users mailing list