Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/275.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 断言/重试,32位和64位的不同行为_C#_Debugging - Fatal编程技术网

C# 断言/重试,32位和64位的不同行为

C# 断言/重试,32位和64位的不同行为,c#,debugging,C#,Debugging,我正在使用现成的WindowsFormsApplication。我唯一添加的是Form1\u Load事件处理程序,如下所示(Visual Studio Premium 2013): 对于64位调试构建:当我点击一个debug.Assert(false)并按下Retry按钮时,调试器会打断相应的源代码行 对于32位调试构建:当我点击与上面完全相同的行时,会显示消息框,但点击重试按钮不会中断 问题1:首先,为什么行为会有所不同 问题2:如何使32位调试构建在点击重试时中断 编辑 我确实观察到了上

我正在使用现成的WindowsFormsApplication。我唯一添加的是
Form1\u Load
事件处理程序,如下所示(Visual Studio Premium 2013):

  • 对于64位调试构建:当我点击一个
    debug.Assert(false)
    并按下Retry按钮时,调试器会打断相应的源代码行
  • 对于32位调试构建:当我点击与上面完全相同的行时,会显示消息框,但点击重试按钮不会中断
  • 问题1:首先,为什么行为会有所不同

    问题2:如何使32位调试构建在点击重试时中断

    编辑

    • 我确实观察到了上述在Windows 8.1、Visual Studio Premium 2013(版本12.0.30723.00更新3)上的行为
    • 我不观察上述在Windows 8.1 Visual Studio Premium 2013(版本12.02.21005.1 REL)上的行为。具体地说,当对32位调试构建点击“重试”时,调试器会直接进入代码。包含
      Debug.Assert
      的行被涂成黄色,而64位调试版本中的同一行被涂成绿色

    今天,我安装了针对Microsoft Visual Studio Premium 2013的更新4(版本12.0.31101.00更新4),问题已经解决。对于32位和64位调试版本,调试器在重试时停止

    (无论出于何种原因,包含32位的
    Debug.Assert(false)
    的行是黄色的,64位的是绿色的。)

    有趣的是
    private void Form1_Load(object sender, EventArgs e)
    {
        Debug.Assert(false);
    }