
在vs code的设置中搜索 terminal.external.windowsexec,在唯一选项里修改为
C:\Users\你的用户名\AppData\Local\Microsoft\WindowsApps\wt.exe cmd

或者在vs code的settings.json中添加一条
"terminal.external.windowsExec": "C:\\Users\\你的用户名\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe cmd"
在项目文件夹下的.vscode中修改launch.json,将”console”修改为”externalTerminal”可达到运行代码时在外部打开新窗口的效果,详细代码如下
// launch.json
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: 当前文件",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "externalTerminal"
// "integratedTerminal" //vscode内置窗口
// "externalTerminal" //在外部打开新终端
}
]
}
然后是windows terminal的配色方案 如下
"profiles": {
"defaults": {
"useAcrylic": true,
"acrylicOpacity": 0.5,
"colorScheme": "One Half Dark",
"backgroundImage": "O:\\pics\\vsbg\\2.png",
"backgroundImageStretchMode": "none",
"backgroundImageAlignment": "bottomRight"
// Put settings here that you want to apply to all profiles.
},
2.png是我自己扣的图,也是从另一个vs code的背景插件里抓下来的,共三个,放下面了,右击另存为。
关于如何修改wt的默认终端为cmd以及一些其他的简单问题,请百度


