进入文件-> 首选项->设置中编辑setting,如果不是中文可以按ctrl + shift +p 进入 Configure display language进行设置。
之后直接添加参数
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"overrideName": true,
"args": ["-NoExit", "/c", "chcp 65001"],
"icon": "terminal-powershell",
"env": {
"TEST_VAR": "value"
}
}
},
"terminal.integrated.defaultProfile.windows": "PowerShell",