.ofilter (Filter Target Output)

The .ofilter command filters the output from the target application or target computer.

.ofilter [/!] String 
.ofilter "" 


Reverses the filter so that the debugger displays only output that does not contain String. If you do not use this parameter, the debugger displays only output that contains String.

Specifies the string to match in the target's output. String can include spaces, but you cannot use C-style control characters such as \" and \n. String might contain a variety of wildcard characters and specifiers. For more information about the syntax, see String Wildcard Syntax.

You can enclose String in quotation marks. However, if String includes a semicolon, leading spaces, or trailing spaces, you must use quotation marks. Alphanumeric characters in String are converted to uppercase letters, but the actual pattern matching is case insensitive.



User mode, kernel mode


Live, crash dump



Additional Information

For more information about OutputDebugString and other user-mode routines, see the Microsoft Windows SDK documentation. For more information about DbgPrint, DbgPrintEx, and other kernel-mode routines, see the Windows Driver Kit (WDK).


If you use the .ofilter command without parameters, the debugger displays the current pattern-matching criteria.

To clear the existing filter, use .ofilter "". This command filters any data that is sent by user-mode routines (such as OutputDebugString) and kernel-mode routines (such as DbgPrint). However, the debugger always displays prompts that DbgPrompt sends.

The DbgPrintEx and KdPrintEx routines supply another method of filtering debugging messages that you do not want.

Send comments about this topic to Microsoft