Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!

Visual Studio - intercepting debug messages

  • You cannot reply to this topic
3 replies to this topic

#1 fnm   Members   -  Reputation: 491


Posted 20 August 2013 - 12:37 AM

As the title says; any hint on how to do it? I need to get somehow the debug messages sent by a tool to the debug window and filter them. 

Thanks for any help.


#2 AllEightUp   Moderators   -  Reputation: 4643


Posted 20 August 2013 - 02:29 AM

First off, I assume you mean the VC output pane?  Assuming that is correct, you need to override the output of the library to use OutputDebugString instead of cout or related items.  Unfortunately not a lot of libraries out there let you redefine their logging systems and this may be impossible without hacking up the given library.  Filtering messages is not viable from the source side of things, i.e. the program will log everything and the output console will print everything.  Filtering is only valid if you put the filters into the program and control it that way or you post process the logs and remove the excessive items.


All said and done, it is highly problematic and unlikely to have a 100% solution.

#3 fnm   Members   -  Reputation: 491


Posted 20 August 2013 - 04:10 AM

Yes, it is the output pane. I'm using VS to build a CodeGear project and I'd like to intercept the debug messages and translate them in VS format. From my research so far it seems that Windbg is the way to go.

Thanks for your answer.

#4 ApochPiQ   Moderators   -  Reputation: 17626


Posted 09 September 2013 - 04:54 PM

Is this basically what you want to accomplish?