Example: Tracing Information from a dotNet Application |
Microsoft supplies debugging tools under the name of Sysinternals at the following URL:
http://technet.microsoft.com/en-us/sysinternals/default
You can download a tool named dbgview.exe from this location. You can use this tool to catch trace information from a .Net application used in a USoft application.
The following example illustrates how you could make use of dbgview.exe.
#define TRACE using System; using System.Diagnostics;
class TRACE { public static void write( String message ) { Trace.AutoFlush = true; Trace.Indent(); Trace.WriteLine( message); Trace.Unindent(); Trace.Close(); } }
SELECT TRACE.WRITE( Testing C# trace );
The listing in dbgview.exe will show the message. |