Bug 4072 - Using base keyword does not work in debugger
Summary: Using base keyword does not work in debugger
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: Trunk
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2012-03-23 11:27 UTC by Marek Safar
Modified: 2012-04-03 13:01 UTC (History)
1 user (show)

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


Attachments
potential fix (2.67 KB, patch)
2012-04-02 16:21 UTC, Jeffrey Stedfast
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:
RESOLVED FIXED

Description Marek Safar 2012-03-23 11:27:55 UTC
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication5
{
	
	class A
	{
		public override string ToString ()
		{
			return "HERE";
		}
	}
	
    class SG : A
    {
        public void Test()
        {
			// Set a breakpoint here and add base.ToString () to Watch window
			return;
        }
		
		public override string ToString ()
		{
			return "SG";
		}
    }

    class Program
    {
        static void Main(string[] args)
        {
            new SG().Test();
            return;
        }
    }
}
Comment 1 Marek Safar 2012-03-23 11:28:36 UTC
Oups, could clean up the usings
Comment 2 Jeffrey Stedfast 2012-04-02 13:45:25 UTC
This seems to have worked for me, although I'm not sure I actually got the right value...

I got "SG" when I expected "HERE"

but maybe my expectation was wrong?
Comment 3 Marek Safar 2012-04-02 13:46:45 UTC
Yes, that's the bug. It always returns "SG" where "HERE" is correct value.
Comment 4 Jeffrey Stedfast 2012-04-02 13:47:50 UTC
nope, my expectation is correct. Lemme test this on newresolver and see if it is fixed there.
Comment 5 Jeffrey Stedfast 2012-04-02 13:48:33 UTC
okay, cool. For some reason I was expecting the bug to be that it hung or you got an exception or something.
Comment 6 Jeffrey Stedfast 2012-04-02 16:21:23 UTC
Created attachment 1613 [details]
potential fix

I gotta head out to my photography class, but this patch is what I have so far and it seems to work.

I'm worried about the changes needed in SoftDebuggerAdaptor.cs tho, not sure why that code that I commented out exists. It seems superfluous and wrong.
Comment 7 Jeffrey Stedfast 2012-04-03 13:01:22 UTC
ok, after more digging, it looks like this change is safe.

committed to master.