6

When I run my app in Xcode, the output area often becomes cluttered by warnings, in my case especially from iAds. Since I'm only interested in my own debug statements, is there a way to specifically output what I want to see?

I notice there's an option to show either "Debugger Output" or "Target Output." What is the difference between these and can they help with what I'm trying to do?

Screenshot of option

Another solution would be to block warnings from iAds, autolayout, etc., if that is possible. Is there a way to suppress specific warnings?

Community
  • 1
  • 1
Alex
  • 676
  • 9
  • 20

3 Answers3

2

What hv88 is saying is that "Debugger output" is the text that comes from the lldb commands you've typed into the console, and "Target Output" is everything that your program writes to stdout. The debugger has no way to tell the difference between "text YOUR code writes to stdout" and "text other libraries write to stdout." It is just one output stream. So that set of choices won't help you with what you want to do.

Note that the console window does have a Find entry, though you won't see it till you type Cmd-F when focused on the console window. So if you mark your output entries with some string that is unique and not to hard to type, you can use the Console Find to navigate to them quickly.

Jim Ingham
  • 25,260
  • 2
  • 55
  • 63
  • 1
    it's worth noting that if you 'edit a breakpoint' and add debug messages, then they will also show up in the debugger output. – mfaani May 13 '18 at 20:59
  • As @Honey says, add an Action to any breakpoint of type "Log Message", then fill in the message and ensure "Log message to console" is selected. This works independently from scheme option to disable OS_ACTIVITY_MODE. – Johan Dec 19 '19 at 15:42
2

'Debugger output' contains values that we check while debugging i.e. while debugging we check the value of variable. This value can be printed on console by clicking 'i' button on pop-up shown.

Screenshot for displaying information

'Target output' contains values printed from NSLog, cout, println etc.

'All output' contains values from Debugger and Target.

Screenshot for console window

Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177
0

The console displays program output and lets you enter commands to the debugger. You specify the type of output the console displays with the pop-up menu at the top of the pane:

All Output: Include target and debugger output.

Debugger Output: Include debugger output only.

Target Output: Include target output only. (e.g NSLog, printf)

https://developer.apple.com/library/mac/recipes/xcode_help-debugger/articles/about_debug_area.html

hv88
  • 328
  • 1
  • 7
  • Thanks, I found this site, but it doesn't really answer my question of what the difference between Target and Debugger Output is and how to specifically create each kind of output. – Alex Jan 08 '14 at 04:14
  • The specific link to the xcode help 'about_debug_area.html' is broken (so it "helpfully" takes you to the main xcode help page) – Don Hatch Apr 30 '19 at 04:29