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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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 >tcome 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-menukey on your keyboard (you know, the one between Right Alt and Right Ctrl), you can use Shift+F10 instead.