How to filter output in Visual Studio 2012+?

I use this method:

Open Debug – Output window, just by right click on the Window.

enter image description here

You can Check / Uncheck as per your need.


Various services in VS write to the output window so there is an in-built filter based on source. You can often select the source such as "Build Output", "Test discovery", "General", "Debug" etc.

Debug.Write calls are intercepted by VS and the text ends up in the Output window but there is no in built filtering.

I can think of 3 ways around this:

  1. Use DbgView to intercept the Debug.Write messages instead of letting VS intercept them. DbgView has very powerful filtering and coloring features*
  2. Try this extension that colors the output based on regular expressions
  3. Write your own extension (it's not that difficult!)

(*) If you go down this route note that Debug.Write is just a trace and when you attach the VS debugger it will add itself as the trace lister. Same for DbgView. But when you detach it will not remove the listener and the messages will be lost.


One thing I just found in VS 2017 (and I think it's in other versions too) is:

Tools | Options | Debugging | General > Redirect all Output Window text to the Immediate Window

This gives you just the program's Debug.WriteX output in the immediate window and leaves all that other trash in the output window, which you can leave closed.

I can still go look at the trash in the output window if I need to for some reason; it isn't suppressed. It just doesn't make it into the immediate window.

And I just leave the little immediate window docked at the bottom.

I think it's good because with all the trash coming out in the output window, I really wasn't paying any more attention to the output than I would a terms of use agreement (which is to say, just about none), so the baby was getting thrown out with the bath water. But now I actually see some program debug output that lo and behold, needs attention.

IMHO Microsoft should expand the output window dropdown box to include all the categories that FetFrumos pointed out in his answer, so developers can just leave it set to "Program Output". I think this would be a good improvement.