When I break on a code and there's a byte myBuffer and I hover over the myBuffer, I get a long scrollable list of decimals or maybe hex.
I would like to have an option to instead view the array in similar view as the "memory view" with 16 hex columns and 16 ascii or unicode side by side.
This should come from hover + right click on the myBuffer and selecting the option.
Also I'd like the following, just as a shortcut to view the memory, or is there a hot key to do this when you are hovering over a variable?
Middle click of the myBuffer, should open the memory view or similar, range bounded (not allowing to scroll to earlier than or after the myBuffer memory) to the myBuffer memory and with option to unbound the range, so memory prior and after the buffer can be scrolled into.
Check out Debugger Visualizers, they can display objects in whatever way you want. For instance I made one that can display a buffer of floats or doubles as a zoomable/scrollable waveform inside a popup window. And you can make that window do whatever you can do in any winforms window, including display it just like the memory view does.
However Debugger Visualizers have some severe limitations, all to do with how badly they were designed:
You can only display types that are serializable. Array is not serializable, so you cannot have a Debugger Visualizer for byte for instance. Since my buffers of audio are either float or double, I hit this same limitation. The way to work around this is to wrap the data in a serializable type. In my case, I made a Debugger Visualizer that can display List<float> and List<double>, both which are serializable. Then for instance if I have a float buffer called myBuffer, in the Watch window I type: new List<float>(myBuffer). This then allows the Debugger Visualizer to display the data.
You cannot use Debugger Visualizers for Windows Phone Development. If you don't do Windows Phone development, then this is not an issue. Supposedly the reason is that Debugger Visualizers require a different security model than what Windows Phone provides. I say this is crap because the debugger itself can see all the same data that the Debugger Visualizer is trying to display. This comes down to a bad design. They should have made it so that whatever you can display in the Watch window should be available to the Debugger Visualizer as well. I fail to see why an API cannot be provided that can allow a Debugger Visualizer to display this exact same data that the debugger has access to, in whatever way it wants. Why does it have to be serializable?
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.