Visual Studio 2015 Debugger Corruption - 是 bug 还是我的问题?
Visual Studio 2015 Debugger Corruption - Is it a bug or just me?
我疯了吗?我一直都能信任调试器,对吗?
事实证明,在使用 VS2015 的调试会话期间,例如,当我更改立即 Window 中的变量值时,该赋值会导致赋值 "garbage" 值。每次都是相同的垃圾值,但仍然完全错误。
我已经将其提炼为最简单的控制台应用程序重现,以防万一您可能认为同意我对疯狂的自我评估,我还制作了它出错的屏幕截图视频剪辑。
你们也遇到这个问题还是本地机器问题?
这是一个驱动器链接:
- Video Clip of repro
- Source code for repro(非常小 - 下面的主要 class 代码)
PS:我是 运行 Windows 10 Enterprise 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 Connect 问题整理相同的内容。
编辑:我开始怀疑这是否只是我的问题,因为没有人证实这也发生在他们身上。
编辑:已提交连接问题 here。
我可以确认在我安装 Visual Studio 2015 时发生了类似的事情
我也在 运行 2013 年 Visual Studio 中使用了相同的代码(幸运的是我在升级时没有卸载它)并且它不会在那里发生:
所以是的,你似乎刚刚在 Visual Studio 2015 中发现了一个错误(我的机器是 运行 Windows 7 Pro,所以这不是 Windows 10期)。不幸的是,我缺乏专业知识来评论你的心理健康,所以不要在这方面做出任何假设:-)
这里有类似的问题。只需 Class 并定位 .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();
}
}
[]
我疯了吗?我一直都能信任调试器,对吗?
事实证明,在使用 VS2015 的调试会话期间,例如,当我更改立即 Window 中的变量值时,该赋值会导致赋值 "garbage" 值。每次都是相同的垃圾值,但仍然完全错误。
我已经将其提炼为最简单的控制台应用程序重现,以防万一您可能认为同意我对疯狂的自我评估,我还制作了它出错的屏幕截图视频剪辑。
你们也遇到这个问题还是本地机器问题?
这是一个驱动器链接:
- Video Clip of repro
- Source code for repro(非常小 - 下面的主要 class 代码)
PS:我是 运行 Windows 10 Enterprise 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 Connect 问题整理相同的内容。
编辑:我开始怀疑这是否只是我的问题,因为没有人证实这也发生在他们身上。
编辑:已提交连接问题 here。
我可以确认在我安装 Visual Studio 2015 时发生了类似的事情 我也在 运行 2013 年 Visual Studio 中使用了相同的代码(幸运的是我在升级时没有卸载它)并且它不会在那里发生:
所以是的,你似乎刚刚在 Visual Studio 2015 中发现了一个错误(我的机器是 运行 Windows 7 Pro,所以这不是 Windows 10期)。不幸的是,我缺乏专业知识来评论你的心理健康,所以不要在这方面做出任何假设:-)
这里有类似的问题。只需 Class 并定位 .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();
}
}
[