35

我已经成功制作了几个 Visual Studio 调试器可视化工具,它们运行良好,除了在某些对象上,当我尝试反序列化对象时出现超时错误objectProvider.GetObject()

System.Exception: Function evaluation timed out.
  at Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.PrivateCallback.MaybeDeserializeAndThrowException(Byte[] data)

超时发生得相当快(可能在我单击可视化工具图标后大约一秒钟),即使我的其他一些可视化工具工作正常,即使大数据对象显示时间更长(5-10 秒)并且仍然没有暂停。

我已经制作了一个自定义对象源,以将序列化限制为我需要显示的字段。我还能做些什么来让数据反序列化而不会超时?

4

3 回答 3

44
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Debugger

我认为这没有记录,但您可以尝试更改上述注册表项中的一些超时,然后重新启动 Visual Studio。

于 2009-07-31T11:38:07.437 回答
5

I was recently hit by this in VS2012 and after googling I found this:

As the exception message says, this exception means the debugger visualizer for the datatable is timed out. In VS debugger, each expression evaluation windows(such as watch window, locals window, datatips, autos window etc..) has different default max expression evaluation timed out value. For datatip, we prefer to give a short time out value because otherwise it will provide a poor user expression. If you do want to use the visualizer functionality for that datatable, you may add the expression to a watch and try to visualize it.(Because watch window has a longer timeout value). If you do want to get rid of this timeout in datatip, you may try to increase the timeout value for datatip. The timeout value is a setting in "DataTipTimeout" registry key under: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Debugger Note: you should probe WOW64Node for 64bit OS. You can also see other windows' default timeout value under this key.

于 2013-04-25T13:52:09.903 回答
0

要让 Visual Studio 调试器正常工作 - “WPF 可视化工具”中的“Locals”窗口(在 WPF 应用程序中测试),您需要在注册表中找到:HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\Debugger\ DWORD 参数“LocalsTimeout”和默认值(1000) 设置为足够大的值,例如 5000。

于 2015-03-31T20:03:14.117 回答