views:

1271

answers:

4

Anyone know of 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.

+1  A: 

found it...

">Edit.ClearAll"

or

">cls"

Scott Ivey
+7  A: 

It looks like >cls is already a defined alias. Look here for the complete list and here for how to define your own aliases. 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: Do you have a context-menu key on your keyboard (you know, the one between right-alt and right-ctrl)? If you're already in the window, you can context-menu-key, L.

lc
i normally use the context key when I'm in the office - but i've been working on a laptop for the past few months from a clients office, and I don't have the context key on it. It finally bothered me enough to look for a solution...
Scott Ivey
+5  A: 
>cls

seems to do it for me.

Martin Brown
doh! I was just missing the > - thanks.
Scott Ivey
A: 

Scott Ivey's answer is perfect. its ">cls" for clearing the immediate window. I got it quickly on googling. Thanks a lot.

Couldn't vote up as i have only 1 reputation right now.

Happy debugging to all :)

Best regards,

Ismail

Ismail