如何防止 Visual Studio 调试器可视化工具超时?
我已经成功制作了几个 Visual Studio 调试器可视化工具,它们工作得很好,但在某些对象上,当我尝试使用 objectProvider.GetObject()
反序列化对象时,会出现超时错误
System.Exception: Function evaluation timed out.
at Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.PrivateCallback.MaybeDeserializeAndThrowException(Byte[] data)
超时发生得相当快(可能在我单击可视化工具图标后大约一秒钟),尽管我的其他一些可视化工具即使对于显示时间更长(5-10 秒)的大型数据对象也可以正常工作,但仍然无法正常工作暂停。
我已经制作了一个自定义对象源来将序列化限制为我需要显示的字段。 我还能做什么来让数据反序列化而不超时?
I've successfully made several Visual Studio debugger visualizers, and they're working very well, except that on some objects I get a time out error when I try to deserialize the object with objectProvider.GetObject()
System.Exception: Function evaluation timed out.
at Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.PrivateCallback.MaybeDeserializeAndThrowException(Byte[] data)
The time out happens rather quickly (maybe about a second after I click on the visualizer icon), even though some of my other visualizers work fine even with large data objects that much longer to display (5-10 seconds) and still don't timeout.
I've already made a custom object source to limit the serialization to the fields I need to display. What else can I do to get the data to deserialize without timing out?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为这没有记录,但您可以尝试更改上述注册表项中的一些超时,然后重新启动 Visual Studio。
I think this is not documented, but you can try changing some of the Timeouts in the above registry key, and restart Visual Studio.
我最近在 VS2012 中遇到了这个问题,在谷歌搜索后我发现 这个:
I was recently hit by this in VS2012 and after googling I found this:
为了让 Visual Studio 调试器正常工作 - “WPF 可视化工具”中的“本地”窗口(在 WPF 应用程序中测试),您需要在注册表中找到:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\Debugger\
DWORD 参数“LocalsTimeout”和默认值 (1000) 设置为足够大的值,例如 5000。
To Visual Studio debugger work well - "Locals" window in "WPF visualizer" (tested in WPF application), you need to find in registry:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\Debugger\
DWORD parameter "LocalsTimeout" and default value (1000) set to big enough value, 5000, for example.