I am working on a Delphi project for the first time, I used to develop on Java.
Is there a way to print in delphi's console like in java.
System.out.println("Message");
which I used to test code and find bugs (primitively).
You must use Writeln
(only for console applications).
{$APPTYPE CONSOLE}
begin
Writeln('Hello');
Readln;
end.
如果要在IDE的事件日志中放置一个字符串,可以使用OutputDebugString
函数。
I usually use the following code for "debugging" my programs.
showmessage('Hello World');
That's how i do it.. :)
If you want something similar to Java console, you can use CodeSite , which uses an independent viewer
Another similar tool is TraceTool
More logging libraries on this question - Which logging library is better?
For debugging messages there is also the GExperts console to which you can write using the SendXXX procedures in GX_DbugIntf. This unit is part of the GExperts source code which is available on SourceForge .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.