How to keep Visual Studio debugger visualizers from timing out?

yoyoyoyosef picture yoyoyoyosef · Apr 24, 2009 · Viewed 16.2k times · Source

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?

Answer

Ying picture Ying · Jul 31, 2009
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Debugger

I think this is not documented, but you can try changing some of the Timeouts in the above registry key, and restart Visual Studio.