Bug 26648 - Debug class logs message multiple times
Summary: Debug class logs message multiple times
Status: RESOLVED DUPLICATE of bug 13538
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: master
Hardware: PC Windows
: High normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2015-02-02 13:26 UTC by Mikayla Hutchinson [MSFT]
Modified: 2016-02-13 09:04 UTC (History)
7 users (show)

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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Mikayla Hutchinson [MSFT] 2015-02-02 13:26:37 UTC
DefaultTraceListener logs to Debugger.Log:


DefaultTraceListener in the MOBILE profile is hardcoded to also log to Console.Out:


This leads to trace messages (Debug.WriteLine etc) showing up twice in the application output.
Comment 1 Nate Cook 2015-02-03 11:22:08 UTC
I look forward to seeing this one fixed.
Comment 2 Gabe Johnson 2015-02-22 18:54:54 UTC
Any progress on this one? I'm about ready to write my own post-processing script so I can read the output more clearly.

Ideally the Debug.WriteLine output could be piped to a different stream, that way the timestamp and such isn't mixed in.
Comment 3 David Karlaš 2015-07-24 10:21:41 UTC

*** This bug has been marked as a duplicate of bug 13538 ***
Comment 4 renan jegouzo 2016-02-13 09:04:08 UTC
on iOS I found a trick 
I was using System.Diagnostics.Debug.Print(..)  that display twice
but System.Console.WriteLine(..) display only once

so just create
public class Debug
	[ Conditional("DEBUG") ]
	public static void Print (string s)
and call this class, not Diagnostics one