Debugging Memory stream data

I’m wanting to store data in a memory stream and then recover it?
The Delphi 7 IDE allowed you to see into a Memory Stream’s data when tracing but not with Delphi 12 - you have to copy the data out into delphi memoy I guess like an array or something.

is their another way to see Memory Stream’s data some how?

It’s not ideal … but if you look at the MemoryStream structure in Local Variables, or Watch, it gives a memory address.

And then you can add a :

View → Debug Windows → CPU Windows → Memory view,

and GOTO that memory address.

… Or you could : Add a Watch for a TBytes( m ) and see it byte by byte …

I went to the final selection View → Debug Windows → CPU Windows → entire CPU and fund the address that I could goto
works thanks - you are on the money

1 Like

I don’t know when it was introduced (Delphi 11?) but there is a built-in debug visualizer for TMemoryStream (and TBytes), available in a few places. e.g. Just hover over the TMemoryStream variable in the source, or find it in local variables, and click the visualizer icon:


Cheers,
Jarrod

1 Like

Only just now have I realised this is a magnifier + some pad or whatever, not some weird rotated question mark. :rofl:
image

1 Like