[Mono-bugs] [Bug 430477] Debug.Assert() does not work in winform apps

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Sep 29 10:29:53 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=430477

User awunwpa7 at yahoo.com.ph added comment
https://bugzilla.novell.com/show_bug.cgi?id=430477#c5





--- Comment #5 from Steve Odbc <awunwpa7 at yahoo.com.ph>  2008-09-29 08:29:53 MDT ---
Debug.Assert() is defined as follows, so as Robert said it works only if DEBUG
is defined during compilation:

[ConditionalAttribute("DEBUG")]
public static void Assert(...)

And with the MS framework I also needed to get rid of another listener before
adding mine:

Debug.Listeners.Clear();

But this was not necessary with MONO in my tests.

Debug.Assert (false, "Yo!") should work.

I can't say if you need to create the message box with the ui thread, since the
MessageBox class should be thread safe anyways. Robert seems to have a deeper
understanding of this question than I do.

Just ensure that System.Windows.Forms.Timer.Tick gets called with the ui
thread.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list