Bug 4650 - Debug.Assert is a no-op and Debug.Fail doesn't exist in MonoMac
Summary: Debug.Assert is a no-op and Debug.Fail doesn't exist in MonoMac
Alias: None
Product: MonoMac
Classification: Desktop
Component: Bindings ()
Version: unspecified
Hardware: PC Windows
: High major
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-04-25 14:51 UTC by Chris Hamons
Modified: 2017-03-05 23:50 UTC (History)
8 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 for Bug 4650 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:

Description Chris Hamons 2012-04-25 14:51:33 UTC
We have some Debug.Asserts in our code, and we've stepped through code that "fails" the Asserts in a debugger. Nothing happens.

It also appears Debug.Fail doesn't exist at all.
Comment 1 Timothy Risi 2015-02-10 20:11:09 UTC
Tested on current stable builds and Debug.Assert now works correctly and Debug.Fail exists
Comment 2 Elliott Prechter 2016-01-14 20:50:39 UTC
It does not appear to be fixed yet. I'm running monodevelop 5.10 with mono 4.2.1 and running Debug.Assert( false ) directly in Main does not cause an exception and does not break into the debugger - it is ignored.
Comment 3 Anuj Bhatia 2016-10-05 21:45:52 UTC
Looks like Debug.Assert() on VS works as expected while in XS as of 6.1.1 is a no-op:

Version Information: