My console is providing no output, no print
s or system debug info on the right side and no variables on the left. I have both console windows open and I do have "All Output" selected. I have tried restarting Xcode and the machine itself but it doesn't seem to fix the issue. For the sake of debugging I am using Swift, I am unsure if this is related but it happened after enabling multiple windows but this may be a coincidence.
The issue is specific to each simulator as the only fix I have found is creating a new simulator but even this breaks after the first build and run.
Looking around I have seen this issue occur for others on Xcode 8 and adding the OS_ACTIVITY_MODE
argument to the run scheme fixes it for those, I have tried and this does not work in this case. I suspect that this is Xcode 11 / iOS 13 specific as did not happen once on prior versions in my experience.
Are there any longterm fixes for this?
Here is small tip for Xcode developers. To show/hide the Console click the icon Show/Hide the console in the lower right corner. It's the last icon on the lower right side of the panel.
Go to Xcode → Preferences → Debugging → On Start → "Show Console". Save this answer.
You want View menu -> Assistant Editor -> Show Assistant Editor. Once you see the pane that holds the console output, if you still aren't seeing the right thing, make any change that will cause a println() to fire and the console output should appear.
For XCode 11 users, not getting any output in their console, assuming that you have the console active (view > debug area > activate console), you'll have to right-click the live preview
and select debug preview
, as follows:
After that, you'll start getting output in your console!
The output above is the following source code, that you can create as a view let's say TestView.swift and copy/paste:
import SwiftUI
struct TestView: View {
var body: some View {
Button(action: { print("Hello world!") }) {
Text("Click me!")
}
}
}
struct TestView_Previews: PreviewProvider {
static var previews: some View {
TestView()
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With