3

I was given a project file and after opening it up I have noticed NSLog does not print to the console.

I've tried shift + command + c and that didn't work.

The strange thing is if I open any other project they print to console just fine still. However this one does not. Is this an xcode setting? if so why is it only this one project that is effected? and how do I go about fixing it?

JMD
  • 1,540
  • 2
  • 24
  • 56

2 Answers2

7

1) newer attempt to help

Make sure you're printing out everything from NSLog. There's a toggle you can set in the console window:

All Output should be selected in the Console output popup

2) original attempt to help

Try doing a "#undef NSLog" at the top part of your code and see if "NSLog" works again.

If so, then Dave is correct... you need to search around your code to see where "NSLog" has been redefined.

Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
  • #undef NSLog made no change – JMD Dec 05 '12 at 15:04
  • if you do a search through your source, can you see any place where "`NSLog`" might be getting adjusted? – Michael Dautermann Dec 05 '12 at 15:06
  • I did a search and got nothing other than general NSLog prints, and asked the person originally working on the project if they had changed anything and they said no. – JMD Dec 05 '12 at 15:11
  • I've tried both the All Output as well as only the Debugger Output ( I read somewhere else before asking this question that changing it to Debugger Only would fix the issue). – JMD Dec 05 '12 at 15:22
0

I know this is an old thread, but I just experienced a case where NSLog suddenly stopped displaying. I don't know what actually caused it but, in my case, a simple restart of Xcode made the problem go away. Just posting in case it helps somebody else.

DRGandin
  • 1
  • 1