我瘋了嗎?我一直都能夠相信調試器嗎?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