Bug 24194 - Application Output Pad not highlight Console.Error output in red.
Summary: Application Output Pad not highlight Console.Error output in red.
Status: CONFIRMED
Alias: None
Product: iOS
Classification: Xamarin
Component: Debugger ()
Version: master
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-10-31 12:54 UTC by Eric Weinschenk
Modified: 2017-08-03 13:05 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 24194 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Eric Weinschenk 2014-10-31 12:54:25 UTC
@mjhutchinson mentioned this feature in his talk at evolve but it's not actually working.



=== Xamarin Studio ===

Version 5.6.2 (build 5)
Installation UUID: f5839db7-406e-4ff4-b8f7-94a64c07ad2b
Runtime:
	Mono 3.10.0 ((detached/633e444)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000020

=== Apple Developer Tools ===

Xcode 6.1 (6604)
Build 6A1052d

=== Xamarin.Mac ===

Version:

=== Xamarin.iOS ===

Version: 8.4.0.15 (Business Edition)
Hash: 08968c4
Branch: 
Build date: 2014-10-20 21:48:06-0400

=== Xamarin.Android ===

Version: 4.18.0 (Starter Edition)
Android SDK: /Users/skimania/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0.3 (API level 15)
		4.4   (API level 19)
Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

=== Build Information ===

Release ID: 506020005
Git revision: 19bc3b64b70332bfab18faf9cf1ce7d3aa191b36
Build date: 2014-10-17 14:49:01-04

=== Operating System ===

Mac OS X 10.10.0
Darwin Erics-MacBook-Pro.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 1 Jeffrey Stedfast 2014-10-31 13:32:22 UTC
Marius: you implemented this feature, didn't you? or was it David?
Comment 2 Marius Ungureanu 2014-10-31 16:15:40 UTC
Pretty sure it was David.
Comment 3 David Karlaš 2014-10-31 17:09:30 UTC
Hi Eric,

are you debugging Console application, Xamarin.Mac, Xamarin.iOS(simulator or device) or Xamarin.Android(simulator or device)?

Tnx
Comment 4 Saurabh 2014-11-03 01:11:25 UTC
As per Comment#3 changing the status to NEEDINFO.
Comment 5 Eric Weinschenk 2014-11-03 10:58:29 UTC
Hey, i thought I responded to this already, but this is using the IOS Simulator and on device.
Comment 6 Eric Weinschenk 2014-11-12 15:38:04 UTC
New Info: Whenever running code in Release Mode all output is Red.
Comment 7 Nate Cook 2015-02-03 11:08:02 UTC
Um, is there any update on this? Seems to make sense to make the output red in debug mode as well. I also tried to use this based on the suggestion by @mjhutchinson
Comment 8 Nate Cook 2015-02-03 11:09:08 UTC
FYI I am debugging  a Xamarin.iOS application using the simulator. Xamarin Studio 5.7, OSX 10.10.2
Comment 9 Matt Ward 2017-02-17 10:04:28 UTC
Still happening with Xamarin Studio 6.2 for iOS projects and a C# console project.
Comment 10 David Karlaš 2017-08-03 13:05:11 UTC
I investigated this a bit, problem is that Xamarin.iOS is using NSLog() method to write anything that is written to Console.WriteLine or Console.Error, afaik reason for this is because it writes into device log + writing to fd=1(stdout) and fd=2(stderr) causes problems if device is not in developer mode...
So what will need to change for start https://github.com/mono/mono/blob/e1b885c/mcs/class/corlib/System/Console.cs#L146-L147 will need to pass true/false(error or output).
After that https://github.com/mono/mono/blob/4504107/mcs/class/corlib/System/Console.iOS.cs#L51 will need to pass this boolean down to native implementation `xamarin_log`. Which will then need some logic to decide to use NSLog or stdout/stderr to write messages...
When debugger is connected it would make most sense to decide based on https://github.com/xamarin/xamarin-macios/blob/ad3a4a1/runtime/monotouch-debug.m#L1255-L1258 if `connect stderr/stdout`(use stderr/stdout) instead of `connect output`(use NSLog)...
Similar logic should probably also be applies to fix Bug 20211.

Reassigning this to XI as changes are needed there.