Friday, March 8, 2013

How to Increase Console Buffer Size in Eclipse IDE - Output and Debug Console

By default Eclipse IDE has limit on console output, also known as console buffer size. Which means, your Eclipse console will overfill quickly, if you are running a Java server program, which usually do lot of logging. Once this happen, you start losing logs. whenever new logs appear, equal number of oldest logs are truncated. Thankfully there is a way to increase output capacity in Eclipse IDE. I discovered this tip, on my search of Eclipse productivity tips e.g. Eclipse shortcuts and settings to organize import. You can increase console buffer size, which is specified in characters by using Eclipse preferences. Eclipse Indigo has default console buffer size as 250000 characters. Eclipse also provides a check box Limit Console Output to put enforce limit on console output, In order to increase console output either you can unchecked this box or you can increase console buffer size. I usually unchecked, Limit Console Output to avoid guessing a good number for console buffer size.

Steps to Increase Console Buffer Size in Eclipse

In order to increase console output capacity, follow these steps :
1) Click Preferences
2) Select Run/Debug
3) Either unchecked Limit console output or increase console buffer size.

By the way, you can also increase width of Eclipse console in this screen. Default width of Eclipse console is 80 characters. Similar to above, you have two options here, either don't use fixed width console or increase maximum character width. I personally don't use fixed width console by un-checking the tick box. Here is the snapshot from Eclipse IDE, which shows where this options are located :

You can clearly say options, rounded with red rectangle, first one is for changing width of console and second one is for increasing output capacity of Eclipse console.

That's all on How to increase console output in Eclipse. As I said, it's better not to limit console output, but if you do, make sure to choose a size large enough for your purpose.

This was another nice Eclipse setting, which helps a lot while running Java application from Eclipse IDE. Eclipse productivity tips helps, to improve your speed and productivity. You can also check following Eclipse tips and tricks :

2 comments :

Bhavna said...

WOW, Great tip Javin. I always struggled to get complete log because of lower default size of console buffer in Eclipse 3.6 version, didn't know about this tip. Now after setting it much higher, I am getting all logs, which I need. Looking forward to more of such Eclipse productivity tips in future.

Deeps said...

Hi, Wondering why you have n't mentioned about redirecting the console to file option of eclipse here which I do use more often .

go to Run -> Debug Configurations on Eclipse menu. Then under "Standard Input and Output" section, click on checkbox next to "File:", and choose the name of output file to use. If you check "Append" underneath, console output will be appended to the output file. These options will under common in line tab. Otherwise, console output will be overwritten to the file.

Post a Comment