Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio immediate window command for Clear All

Is there a command to clear the immediate window in Visual Studio?

I hate having to grab the mouse for a right click menu there - would rather just type "cls" or something.

like image 906
Scott Ivey Avatar asked Apr 03 '09 15:04

Scott Ivey


People also ask

Is there an immediate window in Visual Studio code?

There is no Immediate Window unlike Visual Studio in VSCode. But you can still execute Javascript in VSCode. Open the JavaScript file in VSCode, then use shortcut Ctrl + Alt + N , the code will run and the output will be shown in the Output Window.

What is difference between immediate window and window?

The differences between the Command and Immediate windowsThe Command window can load dlls or packages into the IDE as well. The Immediate window, on the other hand, is solely used during debugging and is useful to execute statements, print values of a contextual variable, or even evaluate expressions.

What is used in the immediate window to display the current value of the variable?

Print is used to show the value of a variable instantly in the immediate window.

Which window is used to execute commands directly by writing into the window?

The Command window is used to execute commands or aliases directly in the Visual Studio integrated development environment (IDE). You can execute both menu commands and commands that do not appear on any menu. To display the Command window, choose Other Windows from the View menu, and select Command Window.


1 Answers

To clear the immediate window, you can use >cls, which is a predefined command alias to >Edit.ClearAll.

The MSDN article lists all predefined aliases and you can define your own, too. (For VS 2010 and earlier, custom aliases are described in a separate article, though.) Scanning through, there's a whole slew of them, some of which might even have their roots in MS-DOS DEBUG.EXE (specifically >d, >g, >p, >q, and >t come to mind).


Also worth noting as it's only two keys to press: Context menu > Clear All invokes the same command and it can be navigated using keyboard. Therefore in the immediate window, you can press Context Menu, L.

If you don't have a context-menu key on your keyboard (you know, the one between Right Alt and Right Ctrl), you can use Shift+F10 instead.

like image 122
lc. Avatar answered Sep 20 '22 14:09

lc.