Bug 7880 - [CorDebugger] Debugging is broken for the foreach statement
Summary: [CorDebugger] Debugging is broken for the foreach statement
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: 3.0.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-10-17 10:34 UTC by Allie Miller
Modified: 2013-09-16 14:14 UTC (History)
3 users (show)

Tags:
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 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.

Related Links:
Status:
RESOLVED FIXED

Description Allie Miller 2012-10-17 10:34:11 UTC
Case #:18573

Debugging is broken for the foreach statement
public static class Foreach
{
public static IEnumerable<T> Test<T>(IEnumerable<T> sequence, Action<T> action)
{
foreach(var item in sequence)
{
action(item);
}

return sequence;
}
}
class MainClass
{
public static void Main(string[] args)
{
Foreach.Test(
new string[]{"One", "Two", "Three"},
Console.WriteLine);
}
}

MonoDevelop: 3.0.4.7
Runtime: Microsoft .NET v4.0.30319.17929
Operating System: Windows (Microsoft Windows NT 6.2.9200.0)
Distributor: Xamarin
MonoDevelop 3.0.4.7
Installation UUID: e040294e-bd60-4d08-9483-1bbfa25a8e43
Runtime:
Microsoft .NET 4.0.30319.17929
GTK 2.16.6
GTK# (2.12.0.0)
Mono for Android: Not Installed

No build info
Operating System:
Windows 6.2.9200.0 (64-bit)
Comment 1 Gabe Johnson 2013-08-04 13:38:43 UTC
I can confirm this bug is still present on OSX. Any movement on this?

This is nearly a showstopper, because if I need to debug code inside a foreach block I have to re-write it as a standard for-loop.

=== Xamarin Studio ===

Version 4.0.10 (build 7)
Installation UUID: b737f83e-0f6e-4cc5-8c4c-f9b62242f47e
Runtime:
	Mono 3.2.0 ((no/7c7fcc7)
	GTK 2.24.20
	GTK# (2.12.0.0)
	Package version: 302000000

=== Apple Developer Tools ===

Xcode 4.6.3 (2068)
Build 4H1503

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.iOS ===

Version: 6.4.0.2 (Business Edition)
Hash: c9f7659
Branch: 
Build date: 2013-18-07 21:36:03-0400

=== Xamarin.Android ===

Not Installed

=== Build Information ===

Release ID: 400100007
Git revision: f324e2154ee86ae1b6b8483392eddbf418e6381b
Build date: 2013-07-20 06:23:58+0000
Xamarin addins: fe4f180e2386eafc00087ef68c3a580cff4a2592

=== Operating System ===

Mac OS X 10.8.4
Darwin Gabes-MacBook-Pro.local 12.4.0 Darwin Kernel Version 12.4.0
    Wed May  1 17:57:12 PDT 2013
    root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64
Comment 2 Jeffrey Stedfast 2013-08-04 19:49:45 UTC
Gabe,

Your bug isn't the same as this bug. This bug is in a specific debugger backend that isn't used on Mac OS X (it's only available on Windows).

Could you file a new bug and attach a sample program that shows the problem you are seeing? I seem to be able to debug foreach loops without any problems.

Thanks.
Comment 3 Marius Ungureanu 2013-09-16 14:14:17 UTC
Fixed and will be included in future releases.