Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
As far as I can tell, Debug.Assert doesn't give any popup or console trace - it doesn't appear to do anything.
Is this a bug, by design or a config issue in MonoDevelop? If it's by design, I think that is a mistake as the .NET environments that developers will be coming from handle it quite differently (a popup.)
I don't think a popup would be helpful but the option to throw an exception so we can catch it *at the time* would be very useful.
You can easily do this yourself by implementing a subclass of System.Diagnostics.TraceListener and add it to Debug.Listeners.
If you want an exception to be thrown, just make your ExceptionalTraceListener throw an exception in the Fail implementation.
That sounds like good advice but I can't find TraceListener in System.Diagnostics.
This has been fixed now (mobile-master: 185961ba, master: 976279, 2.10: 9d103ff).
The fix will be included in MonoTouch 5.3.3.
By default Debug.Assert will print the assertion to Console.Out, but you can use TraceListeners do basically do whatever you want.