Visual-studio – Visual Studio immediate window command for Clear All

immediate-windowvisual studiovisual-studio-2008

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.

Best Answer

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. 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.