0

Why can I see print call in the debug area / active console?

import SwiftUI

struct ContentView: View {
    var body: some View {
        VStack {
            Text("Hello, world!")
                .padding()

            Button("Print Line") {
                print("Button clicked! This line will be printed.")
            }
            .padding()
        }
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}

enter image description here

ThomasReggi
  • 55,053
  • 85
  • 237
  • 424

0 Answers0