Capturing Debug Output

DebugView

Capturing Debug Output

Global Capture

You control DebugView’s global capture mode by toggling capture-on and capture-off with the global.gif toolbar button, the Capture|Capture Events menu entry, or the Ctrl+E hot-key sequence. DebugView does not capture any data when its capture-mode is off. The state of Win32 capture and kernel capture determine what kind of debug output (if any) is captured when the global capture mode is on.

Capturing Win32 Debug Output

If you specify, DebugView will register to receive and print debug output generated by Win32 programs that call OutputDebugString. The win32.gif toolbar button, the Capture|Capture Win32 menu item, and the Ctrl+W hot-key sequence can toggle this capture on and off. If the Win32 PID options is set (under Options|Win32 PIDs) then information identifying processes that generate Win32 debug output is prefixed to each line of Win32 debug output. If you are running DebugView on Windows NT/2K, then the process ID of the processes are prefixed in brackets to each line of Win32 debug output. If the option is set and you are running on a Win9x system, then the process name is prefixed in brackets to the output.

If you run DebugView in a remote logon session of Windows 2000 Terminal Services, DebugView adds a Capture Global Win32 menu item to the Capture menu. Whereas the Capture Win32 menu item and associated toolbar button enable and disable capture of debug output in DebugView's local logon session, the Capture Global Win32 menu item lets you enable and disable the capture of debug output that is generated in the console (global) session. Win32 services run in the console session, so this feature lets you capture the output that services generate even when you are running DebugView in another logon session.

Capturing Kernel-Mode Debug Output

You can configure DebugView to capture kernel-mode debug output generated by device drivers and/or the Windows kernel by using the Capture|Capture Kernel menu selection, kernel.gif toolbar button, or the Ctrl+K hot-key. Process IDs are not reported for kernel-mode output since such output is typically not process-context related.

On Windows NT/2K, kernel-mode capture is only possible if the user account in which you run DebugView has the "load driver" privilege. If the account does not have this privilege then DebugView disables the kernel-mode capture and pass-through mode toolbar buttons and menu items.

Under Windows NT/2K, Win32 debug output and kernel-mode debug output originate with two different sources. Therefore, DebugView captures the different outputs into two separate buffer pools, and merges the outputs in the display window according to their relative sequence numbers. While this means that the order of kernel-mode and Win32 output is correctly represented, the update of such information may not be sequential i.e. DebugView may display a number of Win32 debug messages, and shortly after merge in kernel-mode debug messages that have interleaved sequence numbers. This is the reason that sequence numbers are represented as 8-digit numbers: the display’s listview auto-sorting feature is used by DebugView to order merged kernel-mode/Win32 output.

Pass-Through Mode

DebugView can be configured to pass kernel-mode debug output to a kernel-mode debugger or to swallow the output. The pass-through mode is toggled with the Capture|Pass-Through menu selection or pass.gif toolbar button. The pass-through mode allows you to see kernel-mode debug output in the output buffers of a conventional kernel-mode debugger while at the same time viewing it in DebugView.

Inserting Comments

You can insert comments into the output log by selecting Edit|Append Comment. Comments insert into the currently viewed output. Type comments into the dialog followed by the return key and dismiss the dialog when you are done entering comments.

Clearing the Display

An application that generates debug output can cause the DebugView display to clear by printing the string "DBGVIEWCLEAR".