Dim*_* C. 6 .net c# debugging visual-studio-2010 assertions
我正在使用Visual Studio 2010编写.NET断言:
Debug.Assert(false, "Testing Debug.Assert");
Run Code Online (Sandbox Code Playgroud)
当我在这行代码上放置一个断点时,等到断点到达,然后让程序继续运行,一切正常:弹出"断言失败"对话框.但是,当我删除断点并重新运行应用程序时,将忽略Debug.Assert()语句.
有谁知道什么可能导致这种非常奇怪的行为?
我的一位同事立即知道问题出在哪里。我必须在“Visual Studio 2010 /菜单/选项/调试/常规”中启用“仅启用我的代码”标志。显然这是Visual Studio 2010 中的一个错误”。