Every day is a learning day, and today I needed some way for my client to view the debug log for the Debug Version of an Application I created to test a piece of hardware which was acting up. After a little searching around I came across the Microsoft Sysinternals DebugView application; http://technet.microsoft.com/en-us/sysinternals/bb896647
Microsoft describe this DebugView as;

… an application that lets you monitor debug output on your local system, or any computer on the network that you can reach via TCP/IP. It is capable of displaying both kernel-mode and Win32 debug output, so you don’t need a debugger to catch the debug output your applications or device drivers generate, nor do you need to modify your applications or drivers to use non-standard debug output APIs.

So, in order to view the Debug Log I had already created in my App was as simple as;

  1. Download the DebugView Application from http://download.sysinternals.com/files/DebugView.zip
  2. Extract the contents of the ZIP to a location on your hardrive
  3. Run the DebugView Application as an administrator
  4. Run your Application
  5. Your Debug Messages will appear in the Window;

image

If you find that some other applications are also emitting debug information, then you can setup a filter, so that only your application is shown;

  1. Next to the Debug Messages for you application will be a number in square brackets. This is the PID of your application. Take a note of this number.
  2. Press the Filter/Highlight button;
  3. image

  4. The Filter Highlight dialog will be shown;
  5. In the Include Box, remove the Star and enter your PID;
  6. image

  7. Press OK, and now you should only see the debug output from your application.

It’s worth noting that each time you start your application, it’s PID will change, so bear that in mind as your Filter will need adjusting to suit of course. You can either remove the filter to find your PID, or use Task Manager.

Very handy.

By | 2017-07-24T08:33:17+00:00 August 21st, 2014|.Net Framework, Debugging, Development, Tips, Visual Studio|0 Comments

About the Author:

Leave A Comment