{ // 在集成终端中运行,而不是"输出"面板 "code-runner.runInTerminal": true, // 使用命令提示符(PowerShell 5.1 不支持 && 连接符,会导致命令报错) "terminal.integrated.defaultProfile.windows": "Command Prompt", // 运行前先把控制台代码页切换为 UTF-8 (65001) "code-runner.executorMap": { "python": "chcp 65001 >nul && python -u" }, // 终端默认编码 "terminal.integrated.env.windows": { "PYTHONIOENCODING": "utf-8" } }