0

When I run two apps from XCode debugger, I can see their own NSLog into the console. But when one app exist with an exit call, it is killed and I can't see the console log anymore. How may I do to be able to see it.

In other words, i'm debugging the app, and when something bad happens, I have put a message in the log followed by an exit. I would want to see the place where that happened.

Oliver
  • 23,072
  • 33
  • 138
  • 230

2 Answers2

2

Select what is called the "Log Navigator" and select the debug session, see image

enter image description here

epatel
  • 45,805
  • 17
  • 110
  • 144
1

If you replace your exit call with a

raise(SIGINT);

the execution of the program will be paused if you're running with a debugger attached. If you're running without a debugger (i.e. in production), the app will be killed.

joerick
  • 16,078
  • 4
  • 53
  • 57