Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can the Visual Studio (debug) Output window be programmatically cleared?

is it possible to have a way to clear the Visual Studio OUTPUT window, programmatically? For example, the SysInternal's debugger app called DebugView has the specific command called DBGVIEWCLEAR .. which clears the log window.

Please don't say: right-click, clear window .. with the mouse. I know that, but that's not what i'm after.

like image 766
Pure.Krome Avatar asked Mar 06 '10 05:03

Pure.Krome


People also ask

How do I stop the Output window in Visual Studio?

Go to Tools, Options, Projects And Solutions, and uncheck Show Output Window when Build Starts.

What is the debug output window?

The Debug Output window displays print output from the script, as well as any error messages from the Lua engine describing errors in the script. Deleting, Copying, and Scrolling Output. Click to delete all current output in the window. Click to copy the current output to your computer's clipboard.

How do I show debug output in Visual Studio?

To see the debug output window, in Microsoft Visual Studio, click View, click Other Windows, and then click Output. You can view the debug output in this window only if the debugger is attached to the process that is writing to the output window.

What is Vscode output window?

The Output window displays status messages for various features in the integrated development environment (IDE).


1 Answers

For VS 2008 try this code

EnvDTE80.DTE2 ide = (EnvDTE80.DTE2)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.9.0");
ide.ExecuteCommand("Edit.ClearOutputWindow", "");
System.Runtime.InteropServices.Marshal.ReleaseComObject(ide);

"VisualStudio.DTE.9.0" will change from VS version to version.

like image 88
Adriaan Stander Avatar answered Nov 06 '22 00:11

Adriaan Stander