views:

63

answers:

3

I saw a screencast recently and what really got me interested is that messages in debugger output window were displayed in different colours (different color for warnings, exceptions etc).Unfrotunately I can't find this screencast anymore.

Does anyone know if this is a new feature of VS2010 or is it part of 2008 and just need turning on?

A: 

this scott guthrie blog post will show you how to use the output window for debugger and using the marcos it can be coloured

http://weblogs.asp.net/scottgu/archive/2010/08/18/debugging-tips-with-visual-studio-2010.aspx

PaulStack
I had a look at this article but cannot see how to color the output.Great tips there though so thanks
jonasz_iva.ru
@PaulStack, i don't see any way in that post to color the output
JaredPar
@jaredpar agree but in one of the links it shows you how to create macros and then from a macro you can colour it - i should have been more clear in my orig answer that it wasnt directly in that first tut
PaulStack
@PaulStack, I followed the links but still no luck. Can't see anywhere whow this could be possible with macros. Could you paste direct link here?
jonasz_iva.ru
@PaulStack I've looked at the macros and the API they are using. There is no way to colorize the output that I can see.
JaredPar
+3  A: 

I think it's only available for Visual Studio 2010, since it uses WPF. Custom formatting for the Debug output window is possible with the VSCommands extension.

Mark Cidade
more and more reasons to upgrade to 2010 it seems :)
jonasz_iva.ru
+1  A: 

It would be pretty easy to do as an extension, if you are interested:

  1. Start with the Diff Classifier sample.
  2. Change the [ContentType] attribute in DiffClassifierProvider.cs to "output".
  3. Delete the ContentTypeDefinition and FileExtensionToContentTypeDefinition exports from DiffClassificationDefinitions.cs.
  4. Add/modify the ClassificationTypeDefinition and ClassificationFormatDefinition exports for the formatting you want to apply.
Noah Richards