Bug 11002 - [CorDebugger] Debugger can't step into and crashes in a generic method extension
Summary: [CorDebugger] Debugger can't step into and crashes in a generic method extension
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: 4.0.1
Hardware: PC Windows
: --- normal
Target Milestone: 4.2.3 (from master)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-03-08 13:00 UTC by benoit.jacquier
Modified: 2014-01-06 04:09 UTC (History)
3 users (show)

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


Attachments
solution and screenshot (73.02 KB, application/octet-stream)
2013-03-08 13:00 UTC, benoit.jacquier
Details


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:
VERIFIED FIXED

Description benoit.jacquier 2013-03-08 13:00:41 UTC
Created attachment 3561 [details]
solution and screenshot

Version: 4.0.1 ( build 9 )

When running the following program, i can't step-into the Compose method ( from line 31 )
After a few step into tries, a System.Reflection.TargetInvocationException is thrown
Please find attached the solution and a screenshot of the exception

Code:

using System;

namespace Monad
{
	public static class MyExtensions
	{
		public static Func<T, V> Compose<T, U, V>(this Func<U, V> f, Func<T, U> g)
		{
			return x => f(g(x));
		}
	}

	class MainClass
	{
	
		static float AddOne( float input )
		{
			return input + 1;
		}

		static float MulByTwo( float input )
		{
			return input * 2;
		}

		public static void Main (string[] args)
		{
			Func<float,float> addOne = AddOne;
			Func<float,float> mulByTwo = MulByTwo;

                        //Cannot stepinto here
			var r2 = addOne.Compose (mulByTwo) (3);
		}
	}
}
Comment 1 Jeffrey Stedfast 2013-03-08 17:41:18 UTC
Is this using the Microsoft .NET runtime? or the Mono runtime? (the default is Microsoft's)
Comment 2 benoit.jacquier 2013-03-09 08:00:36 UTC
Hi,

now i am using Microsoft .NET runtime.
Comment 3 Jeffrey Stedfast 2013-03-09 08:25:40 UTC
thanks
Comment 4 Marius Ungureanu 2013-09-10 05:35:21 UTC
This has been fixed and will be shipped in future releases.
Comment 5 narayanp 2014-01-06 04:09:40 UTC
I have checked this issue with following builds:

All mac and Windows
X.S 4.2.3(build 24) for mac
X.S 4.2.3(build 23) for Windows

No getting exception when using Step In for attached project. This is the screencast for the same: http://screencast.com/t/c8O7kBYeH