8

While building an iOS app in Xcode, how do I set the log to show only what I print()?

I am wasting a huge amount of time sifting through garbage that looks like this

2016-10-18 06:26:49.455995 Lunch[1559:32097] subsystem: com.apple.UIKit, category: HIDEventFiltered, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 2016-10-18 06:26:49.458682 Lunch[1559:32097] subsystem: com.apple.UIKit, category:

I end up using hacks like print("SEARCHFORME") so I can use the find command and search for messages I need while debugging.

1
  • Since Xcode 8.1 this is now off by default Commented Oct 18, 2016 at 11:41

1 Answer 1

19

Go to -> enter image description here

Edit Scheme -> Run -> Environment Variables -> set Name to - OS_ACTIVITY_MODE and Value to - disable.

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.