Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to keep Visual Studio debugger visualizers from timing out?

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?

like image 565
yoyoyoyosef Avatar asked Apr 24 '09 19:04

yoyoyoyosef


People also ask

How do I keep debugging in Visual Studio?

In most languages supported by Visual Studio, you can edit your code in the middle of a debugging session and continue debugging. To use this feature, click into your code with your cursor while paused in the debugger, make edits, and press F5, F10, or F11 to continue debugging.

How do I Deattach debugger in Visual Studio?

When debugging is complete, you can detach the debugger from the process by clicking Debug, and then clicking Stop Debugging in Visual Studio.

What is Debugger Visualizer?

September 17, 2020. VSCode Debug Visualizer is a VSCode extension that allows you to visualize data structures in your editor. This can be useful for visualizing watched values during debugging. I've found the extension can be helpful to visualize plots, tables, arrays, histograms and trees.

How do I get out of for loop debugger?

"Step out of loop" in debugger Follow The only way to do that is to set a break point outside the loop, or position the cursor outside the loop and do "run until cursor".


2 Answers

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.

like image 180
Ying Avatar answered Oct 09 '22 07:10

Ying


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.

like image 32
ldam Avatar answered Oct 09 '22 06:10

ldam