我疯了吗?我一直都能够相信调试器吗?Visual Studio 2015调试器损坏 - 它是一个错误还是只是我?
原来,在与VS2015进行调试会话期间,例如,当我在立即窗口中更改变量的值时,该赋值会导致分配“垃圾”值。每次都是相同的垃圾值,但是完全错误。
我已经完成了这个最简单的控制台应用程序repro,以防万一你可能会认为我同意我的疯狂自我评估,我也做了一个错误的截图视频剪辑。
你们是否也遇到了这个问题,或者这是本地计算机问题?
这里有一个驱动器链接:
- Video Clip of repro
- Source code for repro(非常小 - 主类下面的代码)
PS:我运行Windows 10企业版x64, VS2015 Enterprise具有适用于OS和VS的所有最新更新。底层硬件是我在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's look at it's value now.
// For me (as can be seen in the video), I get the completely wrong value in the console window.
Console.WriteLine(_nullableDateTime);
}
}
我就开始把放在同一个VS连接问题。
编辑:我开始怀疑这是否仅仅是一个问题,因为没有人确认这种情况也发生在他们身上。
编辑:连接问题已提交here。
源代码看起来非常小。最好将代码添加到您的问题中。 – MicroVirus
我会买,类似[这一个](http://stackoverflow.com/questions/31311813/quickwatch-is-not-work-correctly-for-showing-nullable-properties-tostring)。我们无法为您修复该错误,您必须与微软通话。使用连接而不是SO。 –
感谢所有人 - 会做(连接时添加代码和文件问题) – Jaans