@Author:xiaozhu_sai
软件:Visual Studio Code
点击右边的齿轮按钮,打开launch.json
文件,注意"console"属性
即可,具体见一下代码
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: 当前文件",
// "name": "Python: Python",
"type": "python",
"request": "launch",
"program": "${file}",
"python": "C:\\Program Files (x86)\\sotf\\python\\python.exe",
终端输出
// "console": "integratedTerminal"
调试控制台输出
"console": "internalConsole"
}
]
}
console
属性是integratedTerminal
时,会把结果输出到终端。
是internalConsole
时会输出到调试控制台。
想要了解console的细节,请参考小鑫的回答