Thanks for your answer that, although was not my question, is was didatic for me.
I am refering to the Serial TERMINAL which is possible to install into CUBE IDE from ECLIPSE. I would issue "printf" of a variable and collect all this into a file.
Anyway, if you know some way to send the variable value directly to a file, with or instead the serial port, or any port, please, leave here your hint.
As you might suppose, this would be good for post-analysis. Is it possible?
I am considering copy & paste as you pointed-out. I am using Hercules for it successfully.
You can also use ITM Console and the SWO pin to print messages. Intended to be used with debug only. The ITM console allow you to export log-files. But as I said, only assuming that CubeIDE+ST-LINK is connected...