[Mono-bugs] [Bug 52709][Nor] New - System.Diagnostics.Debug methods unexpected behaviour when DEBUG defined

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 9 Jan 2004 13:38:16 -0500 (EST)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by t7@pobox.com.


--- shadow/52709	2004-01-09 13:38:16.000000000 -0500
+++ shadow/52709.tmp.12520	2004-01-09 13:38:16.000000000 -0500
@@ -0,0 +1,75 @@
+Bug#: 52709
+Product: Mono/Class Libraries
+Version: unspecified
+OS Details: Other
+Status: NEW   
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: t7@pobox.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: System.Diagnostics.Debug methods unexpected behaviour when DEBUG defined
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+The various method of class System.Diagnostics.Debug don't seem to
+do anything when they should (i.e. when DEBUG is defined, according
+to the documentation)
+Steps to reproduce the problem:
+1. compile test program below (which #define's DEBUG both within the
+   code and via the mcs switch)
+2. run it
+Actual Results:
+Nothing is printed and main exits without throwing any exception from the 
+assertion failure.
+Expected Results:
+Should display the message passed to Debug.WriteLine() somwhere I think.
+Something should happen as a result of Assert(false) - such as an
+exception thown
+How often does this happen? 
+every time
+Additional Information:
+Not sure if this is a class lib problem or an mcs problem.
+OS is Redhat Fedora core 1 upgraded with some fedora.us packages.
+installed mono-[devel-]0.29 rpms
+It is possible I'm just doing something wrong (?) - perhaps the
+WriteLine isn't supposed to output anything (docs say something about
+Listeners - perhaps a command line execute of mono doesn't install
+any - it should at least to display the messages in stdout).
+At least the assertion failure should do something.
+Also, I tried running with mono --debug, but it made no difference.
+Test code in file debugtest.cs:
+#define DEBUG
+// compile with:
+// mcs /d:DEBUG debugtest.cs
+// run with:
+// mono --debug debugtest.exe
+using System;
+using System.Diagnostics;
+class debugtest
+  public static void Main(string[] args)
+  {
+    Debug.WriteLine("Hello developer!");
+    Debug.Assert(false);
+  }