最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to clear vs code terminal when running RUN CODE? - Stack Overflow

programmeradmin0浏览0评论

I'm learning python, and that when running my code through RUN CODE, it first cleans up the above content in the terminal and then runs the code.

I've already tried this code:

"code-runner.runInTerminal": true,
"code-runner.executorMap": {
    "python": "cls && python -u \"${file}\""
}

I'm learning python, and that when running my code through RUN CODE, it first cleans up the above content in the terminal and then runs the code.

I've already tried this code:

"code-runner.runInTerminal": true,
"code-runner.executorMap": {
    "python": "cls && python -u \"${file}\""
}
Share Improve this question edited Mar 4 at 16:50 Hilory 2,2187 gold badges14 silver badges30 bronze badges asked Mar 2 at 15:44 Nilkeson SouzaNilkeson Souza 1 2
  • 1 what is the problem? Do you get error or what? Did you tried to use cls directly in console? maybe it has to be clear or something else? – furas Commented Mar 2 at 18:18
  • You can just ise print ("") untill you have a blank console. – Kovy Jacob Commented Mar 2 at 19:38
Add a comment  | 

1 Answer 1

Reset to default 0

Use setting:

"code-runner.clearPreviousOutput": true
发布评论

评论列表(0)

  1. 暂无评论