Visual Studio 2015 Debugger Corruption - is it a mistake or is it just me?

I've gone crazy? Have I always been able to trust the debugger correctly?

It turns out that during a debugging session with VS2015, when I, for example, change the value of a variable in the Immediate window, this assignment leads to the assignment of the value "garbage". This is the same garbage value every time, but nonetheless completely wrong.

I redid this to a simple application for a console application, and just in case, you could agree with my self-esteem of madness, I also made a screenshot in which it will work.

Are you getting this problem too, or is it a local computer problem?

Here are links to one drive for:

PS: I am running Windows 10 Enterprise x64, VS2015 Enterprise with all current updates for OS and VS. The main equipment is modern equipment with which I had no problems with VS2013.

internal class Program { private static DateTime? _nullableDateTime; private static void Main( string[] args ) { // Use the debugger to step through this repro. // * Not sure if it matters, but I started with F11 right from the start without any breakpoints. // ============================================================================================== // 1. Variable starts off with default of null // The following statement will confirm that with an "empty" value in the console window Console.WriteLine( _nullableDateTime ); // 2. The next statement assigns the current date and time _nullableDateTime = DateTime.Now; // 3. The following statement will confirm the correct value in the console window Console.WriteLine( _nullableDateTime ); // 4. THIS IS WHERE THE TROUBLE STARTS // Now, using the immediate window, change the value of the variable with the // following statement (after the colon) : _nullableDateTime = DateTime.Now // // // // 5. After changing the value via the immediate window, let look at it value now. // For me (as can be seen in the video), I get the completely wrong value in the console window. Console.WriteLine( _nullableDateTime ); } } 

I will start collecting the same for the VS Connect problem.

EDIT: I'm starting to wonder if this is a problem only for me, since no one has confirmed that this is happening for them.

EDIT: A connection problem has been reported here .

+6
source share
2 answers

I can confirm that this happens in my installation of Visual Studio 2015. I also ran the same code in Visual Studio 2013 (which, fortunately, I did not delete during the upgrade), and this does not happen:

v2013 vs 2015

So yes, it looks like you just discovered an error in Visual Studio 2015 (Windows 7 Pro is running on my machine, so this is not a Windows 10 problem). Unfortunately, I do not have enough professional knowledge to comment on your mental well-being, so do not make any assumptions in this regard :-)

+4
source

A similar problem here. Just take a class and configure .NET 3.5

 public class DoSomething { public void Makeit() { // Set Breakpoint here SortedList<string, string> sortedList = new SortedList<string, string>(); sortedList.Add("test", "1"); sortedList.Add("test2", "2"); //when breakpoint hits, uncomment the next line and press F5 //sortedList.Add("test4", "5"); //Exception class Program { static void Main(string[] args) { TestLibrary.DoSomething bla = new TestLibrary.DoSomething(); bla.Makeit(); } } 

[ animated explanation ]

+1
source

All Articles