How to clear console programmatically in Xcode? How to clear console programmatically in Xcode? xcode xcode

How to clear console programmatically in Xcode?


When in the console (Debug mode), use:

Xcode > Debug > Debug Workflow > Clear Console

Keyboard Shortcut: Command ⌘+K


Swift

print("any value", terminator: Array(repeating: "\n", count: 100).joined())

Objective-C

I think the only thing you can is

for(int i= 0; i < 100; i++) NSLog(@" ");

just like in good old MS-DOS :)


If you are talking about the console in the Xcode window there is a "Clear Console" option in the "Run" menu. There is also, in the "Debugging" Preferences tab an "Auto Clear Debug Console" checkbox. I am referring Xcode 3.2.x