12

I'm trying to do some basic logging while I work on an app. I tossed some NSLog()s into my code, but nothing is being printed to the Xcode console below. Literally nothing, not even some startup info as the app launches, etc.

I've got my Xcode console set to display All Output and I've got the variable inspector and the Console open:

enter image description here

enter image description here

I heard about Logging changes and that a new Console.app was introduced that would let me view the logs on the simulators as well, so I thought maybe the logs would show up over there, but while I do so lots of system messages happening I don't see the NSLog()s that I'm making.

Am I missing something? Is there a new setting I need to flip? Where can I see my NSLog()s?

EDIT:

I was doing this with an iOS 11 simulator and got no console output. When I switched to an iOS 9 simulator then I got all of the console output.

jscs
  • 63,694
  • 13
  • 151
  • 195
Kenny Wyland
  • 20,844
  • 26
  • 117
  • 229
  • Are you sure your debugger is correctly connected? Do your breakpoints still work? – Sulthan Oct 29 '17 at 19:05
  • @Sulthan Yes, my breakpoints are functioning correctly. I just double-checked to be sure. – Kenny Wyland Oct 29 '17 at 19:54
  • I was doing this with an iOS 11 simulator and got no console output. When I switched to an iOS 9 simulator then I got all of the console output. – Kenny Wyland Oct 29 '17 at 19:55
  • That's weird. I can tell you there was no big change and my logs are still working properly. Make sure your Xcode is using the correct xcode tools (that is, the Xcode 9 tools). – Sulthan Oct 29 '17 at 19:56
  • @KennyWyland check https://stackoverflow.com/questions/37886600/ios-10-doesnt-print-nslogs – schmidt9 Oct 29 '17 at 20:32
  • I've seen this as an intermittent phenomenon. Next run, they usually start printing again. – jscs Oct 29 '17 at 21:15
  • Had the issue quite often on Xcode 8, it usually required restarting Xcode. – jcaron Oct 29 '17 at 22:55

1 Answers1

27

Figured it out. It's not an intermittent issue or one that can just be fixed with a restart. It's a Run configuration issue.

Click on the Run Scheme selector in the top left of Xcode's toolar.

Click Manage Schemes.

enter image description here

Click on your main App Project.

Click the Edit button in the bottom left.

enter image description here

Uncheck OS_ACTIVITY_MODE.

Click Close.

Viola. All your console logs come back.

enter image description here

Kenny Wyland
  • 20,844
  • 26
  • 117
  • 229