Search code examples
.netsilverlight

Silverlight debugging, no list element view


When I'm debugging my Silverlight Appliction and I'm using a list internally I cannot hover over the list and see the items inside the list. I just see the RAW view of the list.

If I want to see the items I have to write my own code which is tedious. Is this something normal to Silverlight?

I DO have the correct list view when debugging in normal Console/WPF/... applications.

Example: Silverlight (e.Result is a Dictionary<DateTime, decimal>): silverlight (link: click)

See how there is no 'list view in the first example?

And there in this one, non Silverlight:non silverlight (link: click)

The system is a Windows 7 64-bit, with Visual Studio 2010 and the Silverlight 4 SDK RC2.


Solution

  • 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:

      dic.Take(21)

    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]