为什么Visual Studio在调试时停顿? [英] Why does Visual Studio stall while debugging?
问题描述
[System.Diagnostics.DebuggerDisplay(Form1)]
其他详细信息:
我没有注意到任何类型的模式,特定的行在冻结时。我写的大多数应用程序都使用线程,所以每次都有一个很好的机会。
我遇到这种行为,虽然这是我的第一次。
我已经通过这个问题,通过两种方式
- 您的方式放置此属性,[System.Diagnostics.DebuggerDisplay(Form1)]
- 关闭工具 - >选项 - >调试 - >通用 - >启用属性评估和其他隐式函数调用。
我仍在调试我的代码,但在我看来某些Autos评估失败(可能会引发异常),这可能会导致调试器崩溃。
请让我们知道这是否也是这样。 p>
Sometimes, while I am debugging a c# application, I will hit a break point and when I try to continue, step or step into, it just does nothing. The yellow line highlighting the current line goes away, but it never reaches the next line. The app is still frozen like I am on a breakpoint and I can do nothing but hit the stop debugging button and restart. This doesn't happen all the time, but once it starts on an app it seems like it always happens after that for that app. I have found that adding the following code just before the class declaration "fixes" the problem for that app, but am very curious as to why this is happening.
[System.Diagnostics.DebuggerDisplay("Form1")]
Additional details: I have not noticed any kind of pattern as to what the particular line does when it freezes. Most of the apps I write use threading, so there is a decent chance this is happening within a thread every time.
I have come across with this kind of behavior, though this is my first time.
I have got through this problem, by two ways
- Your way of putting this attribute, [System.Diagnostics.DebuggerDisplay("Form1")]
- Turning off Tools->Options->Debugging->General->Enable Property evaluation and other implicit function calls.
I am still debugging my code but It seems to me that some of the Autos evaluation is failing (possibly throwing an exception), which is possibly crashing the debugger.
Please let us know if this is also your case.
这篇关于为什么Visual Studio在调试时停顿?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!