I press Ctrl+Shift+B to start a build in Visual Studio Code (it\'s configured to just run GNU Make), and the build tool out
Add this user setting to clear the OUTPUT tab on clicking run (▶)
"code-runner.clearPreviousOutput": true,
This is not the same as clearing the terminal but it might be what someone wants.
[Edit] This requires the Runner extension, which I'd recommend for testing/running scripts directly within VS Code.