I remember seeing a trick to write a string from the Debug Evaluate/Modify window to a file, but forgot where.

I remember seeing a trick to write a string from the Debug Evaluate/Modify window to a file, but forgot where.

Anybody who remembered how to do is (if so: please share how).

Comments

  1. FWIW: I do stuff like FPicture.SaveToFile('some\path\a.bmp') there. Maybe you did something similar with TStringList?

    ReplyDelete
  2. Uli Gerhardt I don't have a TStringList instance around in that area, but I was thinking along those lines.

    ReplyDelete
  3. Maybe just write a little helper procedure SaveStringToFile?

    ReplyDelete
  4. This sort of works but leaks memory:

    TStringStream.Create(lRequestMessage).SaveToFile('c:\temp\temp.txt')

    ReplyDelete
  5. Uli Gerhardt that's the issue: I'm debugging through units that are not mine and that are a bit tough to recompile, so I need to do this "low-tech".

    ReplyDelete
  6. CHUA Chee Wee indeed I did, but the ODS doesn't show the full text of the string.

    ReplyDelete
  7. Hey, you live in Amsterdam! I was there around Sep 11 or something. I should have looked you up...

    ReplyDelete
  8. CHUA Chee Wee just sent you a hangout message.

    ReplyDelete
  9. Attila Kovacs thanks. That's the one. It leaks too.

    ReplyDelete

Post a Comment