Brad
Brad

Reputation: 1207

How do I clear the terminal in VSCode programmatically?

I would like to clear the terminal each time I run in java automatically. Any idea how I could accomplish this?

Upvotes: 0

Views: 803

Answers (1)

Molly Wang-MSFT
Molly Wang-MSFT

Reputation: 9521

I'm sorry to tell you there's no such setting that can clear the terminal automatically, but we have some workarounds except running clear commands in terminal:

  1. Add "console": "externalTerminal", in launch.json, then every time you run the java project, there will be an new terminal displayed without previous information; enter image description here

  2. Install Code Runner and add the following code in Settings.json:

     "code-runner.clearPreviousOutput": true,
     "code-runner.showExecutionMessage": false,
    

enter image description here

Upvotes: 1

Related Questions