Can I display the result of a loop in the console window in a VCL application for debugging purposes?
Delphi has got an option for this, check "Generate console application" in the linker options for the project. Standard I/O will be directed to a console window which will accompany your GUI application. Then you can use Writeln etc. as you normally would.
Read Output (or Input) from the docs:
Delphi programs have a standard output file if they are linked as console applications.