Clearing previous ouput in VSCode after build

Has anyone figured out a way to clear the terminal output window in VSCode after starting a build or deploy command from gradle?

I have looked around online but I’ve only seen solutions that effect the terminal after running a “build” command with Ctrl+Shift+B.


On my Mac, putting my cursor in the terminal window and pressing <Enter> clears the build output and gives me a console prompt. I think I saw this same behavior on one of my students’ Windows machines yesterday. Failing that, you could just try “clear” at the console prompt.

You can just close that terminal with the little trash can icon, and it will reset it. there is not a way currently for us to clear that from code.

Clicked the trash can button, and now pressing <Enter> makes the terminal pane disappear! Not sure which behavior I like better…

Edit: clarify observed behavior

Ctrl-l (that’s Ctrl with a lower-case L) usually clears the output and gives you a command prompt. I’ve seen it only partially clear the output, and even close the terminal. Definitely handy when doing repeated builds to fix compilation warnings and errors.