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
GitHub or Developer Community 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.
In the MonoTouch ReachabilitySample, change the beginning of InternetConnectionStatus method to this (ignore, for the moment, whether or not this is the correct thing to do). Essentially, I'm changing the if statement to be a not.
NetworkStatus status = NetworkStatus.NotReachable;
bool defaultNetworkAvailable = IsNetworkAvaialable (out flags);
Set a breakpoint at the beginning of this method.
Debug the application and step through this method.
//Expected: When return NetworkStatus.NotReachable gets executed, the method should return immediately.
//Actual: The debugger executes the return statement and then takes you to the end of the method where the return NetworkStatus.ReachableViaWiFiNetwork line gets executed, and this value is the value that returns from the method.
Does the application behave correctly ?
The debugger uses the (sequence points) inside the .mdb files. The files are mapped to IL instructions and, in some cases , it might seem to jump a bit randomly (since you don't see the IL but the source code). However the execution should work normally.
 using (var x = new disposableobject ()) is a common case since the compiler will create a Dispose call (that occurs later in the IL but has the same source code, i.e. line number, origin).
-> MonoDevelop | Debugger
This actually looks more like a runtime or compiler issue.
In any event, the actual value returned by the method is the correct value, it just makes 1 last stop at the last line of the method even tho it's already hit another return statement.