Sign in to follow this  
fnm

Visual Studio - intercepting debug messages

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this