Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference Between Debugger and Target Output in Xcode

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?

like image 809
Mister Mister Avatar asked Oct 01 '22 22:10

Mister Mister


2 Answers

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.

like image 96
Jim Ingham Avatar answered Oct 13 '22 12:10

Jim Ingham


'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

like image 23
Jayprakash Dubey Avatar answered Oct 13 '22 10:10

Jayprakash Dubey