1. summary
Debugging and log output cannot be avoided during the development process. Applications that use Trace objects can be traced in real time regardless of whether they are running in debug mode or release mode (vs. debugview cannot be monitored when running the program, just double-click exe to run monitoring). By the way, let's test the debugging information output by Trace.Write based on AOT release and application release in normal mode in. NET8.
2. Debugview
Debugview is an application that allows you to monitor debug output on your local system or any computer on a network accessible via TCP/IP. It can display both kernel mode and Win32 debug output, so there is no need for a debugger to capture debug output generated by applications or device drivers, or to modify applications or drivers to use non-standard debug output APIs.

It's very simple to use. Just check these items in Options after starting as an administrator (the output message content will be automatically captured when the. NET program we write runs).

3. test code
using System.Diagnostics;
namespace TraceAOT
{
internal class Program
{
static void Main(string[] args)
{
//指定Trace输出的日志文件名
Trace.Listeners.Add(new TextWriterTraceListener("MyTraceListeners"));
for (int i = 0; i < 10; i++)
{
Thread.Sleep(1000);
//在满足前面的表达式时输出,Trace信息。(同时也向Listeners添加信息。)
Trace.WriteLineIf(i==5, "Trace message.");
}
//Flush完成本次输出
Trace.Flush();
Console.WriteLine("OK");
Console.Read();
}
}
}
4. test results

5. conclusion
The DebugView tool can be used normally in applications based on. NET 8, whether it is AOT or ordinary release. The Trace object can perform real-time tracing regardless of whether programs running in debug mode or release mode, which greatly simplifies our tracing and debugging process.