Bug 30617 - Stepping over foreach exits method
Summary: Stepping over foreach exits method
Alias: None
Product: Runtime
Classification: Mono
Component: Debugger ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Zoltan Varga
Depends on:
Reported: 2015-05-30 15:56 UTC by David Karlaš
Modified: 2015-06-04 16:46 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

screencast (163.21 KB, image/gif)
2015-05-30 15:56 UTC, David Karlaš

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

Related Links:

Description David Karlaš 2015-05-30 15:56:41 UTC
Created attachment 11399 [details]

Sample code:
using System;
using System.Collections.Generic;

class Program
	public static void Main()
	}// 2. You will end here

	static IEnumerable<object> NestedTypes = new List<object>();
	static void Lol()
		foreach (var nestedType in NestedTypes)// 1. Place breakpoint on this line and do step over
		Console.WriteLine("Hi"); // 3. In worst case you should end here

See attachement for sample GIF.
Comment 1 Zoltan Varga 2015-06-04 16:46:37 UTC
Fixed in master/4.2. We end up at the Console.WriteLine () line now.