Why is the dictionary debug visualizer less useful in Visual Studio 2010 for Silverlight debugging?

后端 未结 2 762
醉话见心
醉话见心 2020-12-19 01:52

I was debugging in Visual Studio 2010, which we just installed and trying to look at a dictionary in the quick watch window. I see Keys and Values, but drilling into those s

2条回答
  •  隐瞒了意图╮
    2020-12-19 02:15

    There is a workaround to dump the contents of the dictionary in the debugger.

    1. To your project, add a reference to the linq dll (e.g. System.Core)

    2. Add the following statement to your source file:

      using System.Linq;

    3. In the watch window, type:

      test.Take(1)

    4. Then expand the "Results View" group row. This should give you the familiar list of key, value pairs.

    [This workaround was reported by rickpastoor on connect.microsoft.com for Bug 557741]

提交回复
热议问题