问题描述
当我运行我的代码时,结果通常会显示在终端上,但这一次,它会显示在调试控制台上。我试图将 json 控制台更改为“internalConsole”。
print('test')
控制台日志
D:\python folder>
D:\python folder>
D:\python folder>
D:\python folder>
D:\python folder>
调试控制台
解决方法
-
当我们点击VS Code右上角的运行按钮时,代码会在“终端”中输出结果:
-
当我们调试代码时(点击
F5
或点击“Start Debugging
”按钮),配置文件“launch.json”中的“console”设置有三个不同的设置:1)。
"console": "integratedTerminal",
(默认)(VS Code 的内部终端:)2)。
"console": "internalConsole",
(VS Code 的内部控制台:)3)。
"console": "externalTerminal",
(VS Code 的外部终端:)