allow visualization of byte arrays as strings or chars

Kevin Haynie 7 years ago updated by Mladen Mihajlovic 5 years ago 2

would be really nice to be able to visualize byte[] as a string or char[] when dealing with byte arrays which actually represent text.


Thanks for you feature request! We'll consider this for a future release.

In the meantime, you can use this workaround: Right click your byte-array, choose "Add Custom Expression", and then enter an expression to convert from byte[] to string, such as "System.Text.Encoding.ASCII.GetString([obj])"  (or use "new string([obj])" if you're trying to turn a char[] into a string).

Then also Star your Custom Expression, so that every time you look at a byte[]. it'll look like this:

The drawback of this workaround is that the same Custom Expression will appear on any array, not just byte[]. This drawback will be fixed.

I wonder if a full blown hex viewer wouldn't be a good idea to add. I created a simple open source one here but it would be great to have one built in with more functionality and without the limit of having to use a WeakReference object.