writing to OutputPane-window

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hi,
how do I write info to the OutputPane at runtime ?

I tried the following but am missing some info :


using EnvDTE;
EnvDTE.OutputWindowPane owp;
EnvDTE.OutputWindow ow;

ow =
(EnvDTE.OutputWindow)dteApp.Windows.Item(Constants.vsWindowKindOutput).Objec
t;
owp = ow.OutputWindowPanes.Add( "Writing: ...");
owp.OutputString("...some text");

but how do I create a 'dteApp' object ?

or should I use another approach ?

thnx
Chris
 
Hi Chris,

Anything you send to Console will be shown in the Output pane, so a simple
Console.Write/WriteLine will do.
 
You can also use

System.Diagnostics.Trace.WriteLine("");

This is handy if, at some later point, you may also want to direct the
output to a text file.
 
Back
Top