r/SwiftUI • u/Flimsy-Purpose3002 • Jun 23 '24
How to silence Xcode debug output?
Recently (~6 months ago) Xcode seems to have vastly increased the amount of debug generated when an app runs and nearly all of it seems to be clutter/useless. Apps that ran fine before now generate tons of debug output that clutters everything up and makes it harder to find print statements and real errors. I've investigated several and the consensus online was they were harmless warnings.
Does anyone know how to disable this "useless" debug output? I'm running Xcode 15.4
5
Upvotes
12
u/klavijaturista Jun 23 '24
Is this what you’re looking for:
Edit scheme -> Environment variables -> OS_ACTIVITY_MODE=disable
https://stackoverflow.com/a/42839760
1
u/Tabonx Jun 23 '24
Curious, what is the debug output?
1
u/RKEPhoto Jun 23 '24
Do you have any command line arguments on the Scheme? I think there are arguments that can add a lot of debugging info to the console
3
u/-alienator- Jun 23 '24
In the same boat, commenting to see if anyone else knows. For now I just filter the messages in the console to hide it.
2
u/austinjm34 Jun 24 '24
You can use the filter which is on the left side of the search bar in the console. I filter to ::std when I only want to see print statements.
2
u/ChibiCoder Jun 24 '24
I always just prefix my debug prints with "***" and then filter on that in the output window.