Swift applications are not debuggable by default
I created a simple macOS application with the default storyboard and view controller. Setting breakpoints did not work at all in Swift. The project had a separate C-based library, and breakpoints worked within C files. I had to add the target properties to make breakpoints work. I tried to keep these settings as close to a stock Xcode project as possible.
XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH[variant=Debug] "YES" XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym" XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT[variant=Debug] "dwarf" XCODE_ATTRIBUTE_ENABLE_TESTIBILITY[variant=Debug] "YES" XCODE_ATTRIBUTE_GCC_GENERATE_DEBUGGING_SYMBOLS "YES" XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL "s" XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL[variant=Debug] "0" XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN "NO" XCODE_ATTRIBUTE_CLANG_ENABLE_MODULES YES XCODE_ATTRIBUTE_SWIFT_OPTIMIZATION_LEVEL "-Owholemodule" XCODE_ATTRIBUTE_SWIFT_OPTIMIZATION_LEVEL[variant=Debug] "-Onone"