Eclipse - 如何赋予 Java 控制台无限长度(以 # 行)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12945882/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse - how to give the Java Console unlimited length (in # lines)
提问by IAmYourFaja
Possible Duplicate:
adjusting eclipse console size
可能的重复:
调整 Eclipse 控制台大小
I am trying to debug an app that I have set up to run locally and it is writing all of its System.out.println()statements to the Java Console in Eclipse.
我正在尝试调试已设置为在本地运行的应用程序,它正在将其所有System.out.println()语句写入Eclipse 中的 Java 控制台。
The problem is, it's spitting out 10s of thousands of lines, and by the time the app finishes processing and shuts down, I can only see the last ~25% of sysout statements.
问题是,它吐出成千上万行,当应用程序完成处理并关闭时,我只能看到最后大约 25% 的 sysout 语句。
Am I doomed? Or is there a setting in Eclipse that lets me un-restrict the number of lines the Console keeps in memory or keeps viewable.
我注定了吗?或者 Eclipse 中是否有设置可以让我取消限制控制台保留在内存中或保持可见的行数。
And, if this isn't possible, is there a way to redirect output to a file or something that canhold 40,000+ lines of output?
而且,如果这是不可能的,有没有办法将输出重定向到一个文件或可以容纳 40,000 多行输出的东西?
Thanks in advance!
提前致谢!
回答by Metalhead
Go to Window > Preferences > Run/Debug > Console there's a checkbox "Limit console output" and a textfield for entering the buffer size of the console.
转到窗口 > 首选项 > 运行/调试 > 控制台,有一个复选框“限制控制台输出”和一个用于输入控制台缓冲区大小的文本字段。
Just try this out. It works for me but my code is outputting not more than 1000 lines .
试试这个。它对我有用,但我的代码输出不超过 1000 行。

