[MonoDevelop] debug data inspection algorithm [why is it so slow and faulty]

Jonathan Shore jonathan.shore at gmail.com
Fri Jan 20 21:23:57 UTC 2012


I want to know more about the algorithm / approach used in monodevelop when inspecting the value of locals.   The data inspection in MonoDevelop is peculiar in that it is extraordinarily slow. 

Very often the debugger says "Evaluating ...".   Sometimes observing an integer local can take many seconds to come back and other times is more-or-less immediate.    This slows down debugging enormously.

Worse, sometimes it "gives up" and indicates "Timed out".  The timeouts tend to happen in the context of the debugger attempting to render large data structures or data structures that have a large ToString() representation.   The time to actually generate strings for these structures if often very small, but perhaps the UI has difficulties in digesting.    Once a timeout occurs on one variable, subsequent variables in a view (such as Locals) will also timeout, probably due to an overall time-limit on variable resolution.

This tends not to happen much with trivial programs, but very often in large codebases.   It makes debugging very painful or in some cases unfeasible such that have to move to windows / visual studio for debugging.    The problem is much worse when attaching to an embedded application via the socket-based protocol (as one might expect).

What is going on with inspection?  Is it walking the stack for each variable or something like that?    If I understand this better then can offer a "bug" report / feature improvement request that is more finely targetted.



More information about the Monodevelop-list mailing list