Since updating to Big Sur, there has been a very annoying lag using CLion and command-line lldb when debugging JUCE projects, even the simplest ones like a Hello World console app.
Whenever the debugger is attached, there’s about 5-7 second delay until the program runs. Without the debugger it runs instantly. It also works perfectly using Xcode, or when debugging non-JUCE projects, or on the same computers running Parallels/Boot Camp.
The issue only happens on Intel Macs (I’ve tried 3) and only when running Big Sur. It’s fine on Catalina and M1 macs, and seems to happen with both LLDB version 10 and 11.
To test, clone the following demo project:
Either debug the console app using CLion, or generate a a project and attach lldb by typing:
I realize this somewhat of an obscure bug, but it probably affects pretty much everyone debugging JUCE projects on Intel Mac/CLion with Big Sur.
I’ve been reporting it to CLion (and recently to LLDB), but this seems to be related to something specific JUCE is doing, probably some static lib loading?
Update, I managed to isolate the issue to be related to the three apple frameworks that JUCE is bringing, as basically an empty CMake file with an empty main() function and the following line: