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()
}
}