首页 > 解决方案 > 新手问题:为什么python中的vscode在调试控制台的打印语句之间会输出额外的换行符

问题描述

运行 vscode 1.33.1,带有 python 扩展的默认配置。

使用基本的打印语句,例如:

print("hello world1")
print("hello world2")

我希望调试控制台有以下输出:

hello world1
hello world2

相反,我得到:

hello world1

hello world2

似乎到处都有额外的换行符。

标签: pythonvisual-studio-code

解决方案


VScode 用户更新到 1.33 版本后会遇到这个问题。这里的问题是 python 扩展发送额外的换行输出事件。这是一个错误,已在git中作为问题提出


推荐阅读