Trying to learn Swift and use debugging. On Xcode Version 12.3 (12C33) any time debugger is entered (on device simulator, or an actual device):
Cannot create Swift scratch context (couldn't create a ClangImporter) (lldb)
po symbol in the (lldb) prompt doesn't work. And so no Swift objects or symbols are available; only an Objective C-type view of them.
This is very annoying! and makes the debugger and debugging basically worthless in Xcode for Swift.
On an M1 Mac mini. I completely uninstalled Xcode and deleted preferences and other developer directories from ~/Library. and re-installed Xcode (from app store). I scoured here and stack overflow for workarounds or diagnoses and nothing has worked.
$ system_profiler SPSoftwareDataType
Software:
		System Software Overview:
			System Version: macOS 11.1 (20C69)
			Kernel Version: Darwin 20.2.0
			Boot Volume: Macintosh HD
			Boot Mode: Normal
			Computer Name: *
			User Name: *
			Secure Virtual Memory: Enabled
			System Integrity Protection: Enabled
			Time since boot: 1:48
this works (swift from command line to run lldb from within) but I have no idea if it's useful info to help diagnose.
❯ swift
Welcome to Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28).
Type :help for assistance.
	1> :
(lldb) expression -l swift -- import Foundation
(lldb)
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: