設置使用 built-in terminal
1) 首先到用戶設置中搜索設置Code-runner: Language ID To File Extension Map
點擊"在settings.json中編輯"
2)添加如圖所示代碼, 保存即可
"code-runner.runInTerminal": true,
{
"files.autoSave": "afterDelay",
"window.zoomLevel": 0,
"editor.fontSize": 18,
"python.pythonPath": "D:\\ProgramData\\Anaconda3\\envs\\py37\\python.exe",
"code-runner.clearPreviousOutput": true,
"code-runner.runInTerminal": true,
}
方法二:
在cmd中輸入
CHCP 65001