每当我试图打破或设置在调试器跟踪点,我们的应用程序和Visual Studio完全冻结。分离调试器后,应用程序继续。
此问题可能与WPF有关。我们已将我们的WinForm应用程序迁移到WPF。从那以后就会出现这个问题但我不能找到导致问题的代码的特定部分。我已经回滚了数百次提交,但没有成功。
它也可能与UI线程有关。如果断点设置在远离UI逻辑的地方,那么应用程序不会冻结,或者不会像UI线程中那样经常冻结。
[编辑:] 我使用的是Windows 7 64位与Visual Studio 2010
[更新:]
当Visual Studio挂起,和我尝试显示断点之前分离,消息“无法从一个或多个进程分离,所有未完成的func-evals尚未完成”。但是我已经禁用了调试选项中的所有func评估。 我认为我的问题是由func_evaluation导致的,无法完成或运行到超时。
有没有办法看到func_evaluation visual studio挂在哪里?
例子:
class SomeUiViewPresenterExample
{
private Timer m_Timer;
public void Init()
{
m_Timer = new Timer();
m_Timer.Elapsed += ElapsedFoo();
m_Timer.AutoReset = false;
m_Timer.Interval = 200;
}
private void ElapsedFoo(object sender, ElapsedEventArgs elapsedEventArgs)
{
// there is no code inside this method
// On the next line a trace point with "---> ElapsedFoo called" will freeze the debugger
}
我已经尝试过:(没有成功)
- 启用/禁用主机进程
- 试图调试x86和x64处理
- 推出visual studio with/SafeMode
- NGEN更新
- 禁用“财产评估和其他隐函数调用”在调试选项
- 禁用符号服务器
- 禁用符号加载
- 删除WPF字体缓存
- 标记几个UI与“DebuggerDisplay元素( “无表达一些文本”)”
可能相关的问题:
因为我们的应用程序使用.NET远程与另一个进程进行沟通,我的问题我是作为here类似的东西。我已经将所有的注册事件都放到了自己的任务中,但没有成功。
从调试的Visual Studio 调试器输出:
我附上一个调试器Visual Studio和已观察到一些例外,(80010005)
,但我不知道wheter它们是相关的我的问题或不:
(18d8.1708): C++ EH exception - code e06d7363 (first chance)
(18d8.1708): C++ EH exception - code e06d7363 (first chance)
..... // snip
(18d8.18dc): **Unknown exception - code 80010005 (first chance)
..... // 20 seconds freeze until breakpoint hit in IDE
(18d8.18dc): Unknown exception - code 80010005 (first chance)
(18d8.18dc): C++ EH exception - code e06d7363 (first chance)
ModLoad: 365f0000 36665000 C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\Debugger\mcee.dll
// after continue execution debugger and debugged process freezes forever
(18d8.18dc): Unknown exception - code 80010005 (first chance)
ModLoad: 00000000`02b90000 00000000`02c1c000 C:\Windows\SysWOW64\UIAutomationCore.dll
(18d8.1a8c): CLR exception - code e0434352 (first chance)
(18d8.1a8c): CLR exception - code e0434352 (first chance)
(18d8.1a8c): CLR exception - code e0434352 (first chance)
(18d8.1a8c): CLR exception - code e0434352 (first chance)
(18d8.1a8c): CLR exception - code e0434352 (first chance)
(18d8.1a8c): CLR exception - code e0434352 (first chance)
(18d8.1a8c): CLR exception - code e0434352 (first chance)
(18d8.1a8c): CLR exception - code e0434352 (first chance)
谢谢你的任何想法或暗示
Manuel
只是一个小点。如果您使用的是WPF,请使用'System.Windows.Threading.DispatcherTimer'(WPF计时器)而不是一般的C#计时器。不知道如果这能解决你的问题。 – sircodesalot
感谢您的提示。但是在这种情况下,操作不应该在UI线程上执行。此操作应该在单独的线程上运行,因为它只更新数据上下文(需要一段时间)并触发属性更改的事件。 –
哪个版本的Visual Studio? – OmegaMan