Xcode 16.3(16E140) failing to debug run but succeeding to build.

Reproduction procedure

  1. Launch Xcode and press shift+command+N to create a macOS App project.
  2. Edit the generated ContentView.swift to the following content:
struct ContentView: View {
  @State var txt: String = “”
  var body: some View {
    VStack {
      Text(“Hello, world!\(txt)”)
      TextField(“input”, text: $txt)
         onSubmit { // lack of a period letter.
//        .onSubmit { // Correct code
          print(“onSubmit\(txt)”)
      }
    }
  }
}
  1. Build with command+B and it succeeds.
  2. Debug with command+R, but a rainbow wheel appears and the window does not show.
  3. An error is displayed in Xcode’s Preview Canvas, preventing preview.

@tana005 What's the issue you're encountering?

Xcode 16.3(16E140) failing to debug run but succeeding to build.
 
 
Q