How-to implement a custom debugger visualiser in VS2008 on an array using a WeakReference?

195 Views Asked by At

I would like to implement a custom debugger visualiser in vs2008 for a typical array as the standard one does not display the data as I would like it. However Visual Studio prevents doing this for arrays for security reasons. I seem to remember though reading about using a WeakReference as a wrapper object to get around this limitation.

So for starters I would like to show something simple (C# code):

bool[] arrayOfBools = new bool[] { true, false, true, true, false };

Where the above is displayed as "10110".

How could I do this using a WeakReference? Is there another way to do this?

For a longer array of bool types it would be useful to display them in a two dimensional grid say using a Uniform Grid layout control in WPF.

0

There are 0 best solutions below