运行构建时如何停止 IntelliJ 截断输出?
当我从 IntelliJ 运行构建时,它会进行大量调试。
但它在 Run
控制台中被截断。
我可以让 IntelliJ 保留更多输出吗?
或者,最好是全部?
When I run our build from IntelliJ it pumps out a lot of debugging.
But it gets truncated in the Run
console.
Can I make IntelliJ preserve more output?
Or, preferably, all of it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
根据流行请求,覆盖控制台周期缓冲区大小设置已添加到 UI 9/14/16:
旧版本的原始答案:
编辑您的
IDEA_HOME\bin\idea.properties
文件,并增加此设置:然后重新启动 IntelliJ。
By a popular request Override console cycle buffer size setting was added to the UI 9/14/16:
Original answer for older versions:
Edit your
IDEA_HOME\bin\idea.properties
file, and increase this setting:then restart IntelliJ.
(现在)可以在 Intellij IDEA 设置中对其进行编辑。
这可能已经在 Intellij IDEA 中出现了一段时间了,当然从 Intellij IDEA 15 开始也是如此。
This can (now) be edited in the Intellij IDEA settings.
This has probably been in Intellij IDEA for a while, and certainly is as of Intellij IDEA 15.
增加控制台 cylce 缓冲区大小的问题是您可能会耗尽堆空间,然后您将需要 增加最大堆大小。对于生成大量输出的应用程序,它可能没有帮助,因为您没有足够的物理内存。
我建议您捕获 文件中的控制台输出。
The problem increasing the console cylce buffer size is that you are likely to run out of heap space, and then you will need to bump up the max heap size. For an app that generates a very large amount of output it probably won't help as you will not have enough physical memory.
I would suggest instead that you capture the console output in a file.
接受的答案对我不起作用(IntelliJ IDEA 2021.2 Mac)。有效的是增加首选项/高级设置中的“终端回滚缓冲区大小”。
终端回滚缓冲区大小的屏幕截图。
Accepted answer did not work for me (IntelliJ IDEA 2021.2 Mac). What did work was increasing "Terminal scrollback buffer size" in Preferences/Advanced Settings.
Screenshot of terminal scrollback buffer size.
对于 IntelliJ 11(至少在 Mac 上),此设置是在 Info.plist 中配置的:
那里应该已经有一个值,因此只需修改它而不是添加新值。
With IntelliJ 11 (on the Mac at least), this setting is configured instead in Info.plist:
There should already be a value there so just modify it instead of adding a new one.
您可以使用此快捷方式
,然后搜索“覆盖控制台循环缓冲区大小”
进入设置。
You could use this shortcut
then search "Override console cycle buffer size"
to get to the settings.
如果您使用保存的配置来启动应用程序,请确保禁用此选项:“在输出控制台中模拟终端”。启用此选项后,输出将始终在几百行后被切断。如果没有它,我认为其他答案中描述的选项是受到尊重的。
If you are using saved configurations to start your app, make sure this option is disabled: "Emulate terminal in output console". With this option enabled, the output would be always cut after a few hundred lines. Without it, I think the option described in the other answers is respected.