SwiftUI - Debug Preview not working in Xcode 12 beta 2?

Nothing prints to the console when I tap on a button, although the debugger will break on the print() lines. I've chosen Debug Preview rather than just Live Preview in the Canvas, and I've tried restarting Xcode. Before I file feedback, is anyone else seeing this?

Code Block struct ContentView: View {
    var body: some View {
        VStack(alignment: .leading){
            Button("One Fish"){
                print("One")
            }
            Button("Two fish"){
                print("Two")
            }
        }
    }
}



  • Hi, I made it worked. For now you will have to click the Top Navigation bar in order to preview the PRINT in Console.

    Check the Attached Screenshot.

    title=Untitled Project.jpg;width=2618;height=1144

Add a Comment

Replies

This bug seems still to exist.
Version 12.4 (12D4e)
mac os 11.2.3
Same issue:

Xcode 12.4
macOS 11.2.2
Apple M1
Same with Xcode 12.5.
Still seeing this issue like everyone else. Would love to see this fixed
The problem still exists on Xcode 12.5 (12E262)

Hi, I made it worked. For now you will have to click the Top Navigation bar in order to preview the PRINT in Console.

Check the Attached Screenshot.