less than 1 minute read

Another very nice tool is DebugView. This is a tool from Sysinternals that enables you to monitor all debug messages on your system. This allows you to have the following in your code:

<?xml:namespace prefix ="" o /> 

Debug.Write("This is written trough System.Diagnostics.Debug.Write.");

Trace.Write("This is written trough System.Diagnostics.Trace.Write.");

 

Debug.WriteIf(inDebug, "This is written because inDebug is true.");      


Having this in your code is very handy for debugging in an early stage, where you haven’t added a logging component, such as Enterprise Library, yet. Or in a scenario where you don’t want to attach the Visual Studio Debugger, or can’t attach it, but still want to view some debug information from your program.

It’s also possible to connect to a remote computer, and intercept these debug messages remotely

050339debugviewremote

After having added code like this, the only thing that has to be done is open DebugView and run the program. DebugView would then intercept the messages and display them as following:

050339debugview

This tool is only 240 KB in size, and completely free, which is really amazing for such a powerful and useful tool.

Source: http://weblogs.asp.net/CumpsD/archive/2005/03/28/396022.aspx