http://i.minus.com/ibsHfIOAy7lBCj.png
I want to write some stuff to VS's output window so I can see what's going on, but it just gets flooded with all this other stuff. Is there some way I can write to a different "channel"? It's got that dropdown there, which I see AnkhSVN has added itself too...can I add another one with only my stuff in there maybe?
Use Trace for this. You will either have an App.config file or a Web.config file in the project that is running. In this file add a trace listener.
When you call trace, which is very similar to Debug, you can specify the level (Info, Warning, Debug, Error). Based on this level you can decide where and how that information is saved.
How to Trace and Debug in Visual Studio
You can use the "Redirect all Output Window text to the Immediate Window" option:
Although it says all, it will only redirect Debug.WriteLine
, etc.
Alternatively you can suppress the noisy messages from the output window itself:
If you create a visual studio addin (in default) you will have a connect.cs with a public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)
You can use this application object to do what you want to do.
DTE2 app = (DTE2)application;
OutputWindowPane XXX = app.ToolWindows.OutputWindow.OutputWindowPanes.Add("XXX");
Now you can use :
XXX.OutputString("some text" + Environment.NewLine);
And this text will appear in the "channel" called "XXX"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With