在 运行 或在 PyCharm 中调试时增加输出缓冲区
Increase output buffer when running or debugging in PyCharm
我的控制台输出超过 PyCharm 在 运行 输出 window 中的缓冲区大小。因此,当我在测试完成后滚动到顶部时,我无法一直到达控制台输出的开头。我可以 运行 在外部终端 window 中进行测试并查看所有输出,但与 PyCharm 的集成很方便。
有没有办法增加 PyCharm 运行 输出的缓冲区大小,以便我可以保留所有日志记录输出并向右滚动到顶部?
是的,您可以在安装文件夹(或 OS X 上的应用程序包中)的 bin/idea.properties
文件中编辑 idea.cycle.buffer.size
设置。
设置:
idea.cycle.buffer.size=disabled
禁用循环缓冲区。
详情见https://www.jetbrains.com/idea/help/file-idea-properties.html。
至少从 PyCharm Community Edition 5.0.3 开始,IntelliJ 不建议编辑 bin/idea.properties
。来自 the URL mentioned above:
The file idea.properties, located in the bin directory of the IntelliJ
IDEA installation folder, should not be edited. Instead of editing the
original idea.properties, create file idea.properties in the location
specified below, open it for editing and add the required properties.
我发现了一种简单的方法:从 PyCharm、运行 帮助 -> 编辑自定义属性。这将在一个空文件上打开一个编辑器 window,您可以在其中创建和保存选项。在我的例子中,文件保存在 %USERPROFILE%\.PyCharm50\idea.properties
.
此外,与其完全禁用循环缓冲区,不如将其从默认值 1024k 增加,例如至 idea.cycle.buffer.size=2048
虽然 JetBrains 的文档中显然缺少它,但我发现在 PyCharm CE 5.0.3 在 Windows 7 Pro 下生效之前,有必要退出并重新启动 PyCharm。
顺便说一句,bin/idea.properties
文件(在我的系统上是 C:\Program Files (x86)\JetBrains\PyCharm Community Edition 5.0.3\bin\idea.properties
)仍然是找出可以编辑哪些设置及其当前值的好地方。
对于PyCharm Community 2016.3 (Mac)您可以在应用程序首选项中增加控制台缓冲区的大小:
None 这些答案对我有用,可以增加社区构建 2021.1 中 运行 工具 Window 缓冲区的大小。
使用 Help/Edit 自定义属性,然后添加行:
terminal.buffer.max.lines.count = 20000000
是唯一对我有用的东西
PyCharm 2021.3 以下对我有用:
文件 --> 设置 --> 编辑器 --> 常规 --> 控制台 -->
然后选中“覆盖控制台循环缓冲区大小 (1024 KB)”
将该值更改为您需要的值
我的控制台输出超过 PyCharm 在 运行 输出 window 中的缓冲区大小。因此,当我在测试完成后滚动到顶部时,我无法一直到达控制台输出的开头。我可以 运行 在外部终端 window 中进行测试并查看所有输出,但与 PyCharm 的集成很方便。
有没有办法增加 PyCharm 运行 输出的缓冲区大小,以便我可以保留所有日志记录输出并向右滚动到顶部?
是的,您可以在安装文件夹(或 OS X 上的应用程序包中)的 bin/idea.properties
文件中编辑 idea.cycle.buffer.size
设置。
设置:
idea.cycle.buffer.size=disabled
禁用循环缓冲区。
详情见https://www.jetbrains.com/idea/help/file-idea-properties.html。
至少从 PyCharm Community Edition 5.0.3 开始,IntelliJ 不建议编辑 bin/idea.properties
。来自 the URL mentioned above:
The file idea.properties, located in the bin directory of the IntelliJ IDEA installation folder, should not be edited. Instead of editing the original idea.properties, create file idea.properties in the location specified below, open it for editing and add the required properties.
我发现了一种简单的方法:从 PyCharm、运行 帮助 -> 编辑自定义属性。这将在一个空文件上打开一个编辑器 window,您可以在其中创建和保存选项。在我的例子中,文件保存在 %USERPROFILE%\.PyCharm50\idea.properties
.
此外,与其完全禁用循环缓冲区,不如将其从默认值 1024k 增加,例如至 idea.cycle.buffer.size=2048
虽然 JetBrains 的文档中显然缺少它,但我发现在 PyCharm CE 5.0.3 在 Windows 7 Pro 下生效之前,有必要退出并重新启动 PyCharm。
顺便说一句,bin/idea.properties
文件(在我的系统上是 C:\Program Files (x86)\JetBrains\PyCharm Community Edition 5.0.3\bin\idea.properties
)仍然是找出可以编辑哪些设置及其当前值的好地方。
对于PyCharm Community 2016.3 (Mac)您可以在应用程序首选项中增加控制台缓冲区的大小:
None 这些答案对我有用,可以增加社区构建 2021.1 中 运行 工具 Window 缓冲区的大小。
使用 Help/Edit 自定义属性,然后添加行:
terminal.buffer.max.lines.count = 20000000
是唯一对我有用的东西
PyCharm 2021.3 以下对我有用:
文件 --> 设置 --> 编辑器 --> 常规 --> 控制台 -->
然后选中“覆盖控制台循环缓冲区大小 (1024 KB)”
将该值更改为您需要的值