Custom Debug Output in Visual Studio 2010
In the output window, there are sections called Build, Debug, and Refactor.
When I do Trace.Write("Hello World!");
, it goes to the Debug section.
Can I create my own section like that and print data to it? I know there is a way to write a file but I just need to see the output temporarily in Visual Stutio.
I'm not sure if my开发者_开发技巧 question is clear or not, but is this possible?
Only Visual Studio addins can create new output sources (those inside the output tool-window), like AnkhSVN does, and many others may also do.
I don't think you can do that from the code being debugged.
You can however try to create a custom listener and add it to Debug.Listeners
.
You can make your own output form, with a text-box on it, and make a listener that outputs to that window, or something similar.
精彩评论