Yup. This works. But is it worth of it?
private void ClearOutput()
{
EnvDTE80.DTE2 ide =
(EnvDTE80.DTE2)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.8.0");
ide.ExecuteCommand("Edit.ClearOutputWindow","");
System.Runtime.InteropServices.Marshal.ReleaseComObject(ide);
}
"Peter Bromberg [C# MVP]" <(E-Mail Removed)> ha scritto nel
messaggio news:E4C7A3F8-3ADA-4B00-8ABF-(E-Mail Removed)...
> Zytan,
> This is inaccurate. With the EnvDTE80 namespace you have programmatic
> access
> to all of the IDE, its windows, and their contents:
>
> http://msdn2.microsoft.com/en-us/library/0e105c68(VS.80).aspx
> http://msdn2.microsoft.com/en-us/library/envdte(VS.80).aspx
>
>
>
> -- Peter
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> Short urls & more: http://ittyurl.net
>
>
>
>
> "Zytan" wrote:
>
>> > Does anyone know how to clear the window so it's easier to see the
>> > stuff you have listed with Debug.Write(xyz)?
>>
>> You can't programmatically. I know, it sucks. Best to make a logger
>> and use that instead. Although, sometimes the Output window info is
>> useful, so its not a complete waste. But, for general debugging it
>> pretty much is.
>>
>> I wonder if you can just create a console, like in Win32 apps? And
>> use that? That'd be the easiest solution, I imagine. But, last I
>> heard you couldn't instantiate Console in .NET 2.0 or later.
>>
>> Zytan
>>
>>