244

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?

catch23
  • 17,519
  • 42
  • 144
  • 217
Paul McKenzie
  • 19,646
  • 25
  • 76
  • 120

7 Answers7

315

By a popular request Override console cycle buffer size setting was added to the UI 9/14/16:

Override console cycle buffer size


Original answer for older versions:

Edit your IDEA_HOME\bin\idea.properties file, and increase this setting:

#-----------------------------------------------------------------------
# This option controls console cyclic buffer: keeps the console output size not higher than the specified buffer size (Kb). Older lines are deleted.
# In order to disable cycle buffer use idea.cycle.buffer.size=disabled
idea.cycle.buffer.size=1024

then restart IntelliJ.

rogerdpack
  • 62,887
  • 36
  • 269
  • 388
CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • 4
    What's the default value of this? – Tim Büthe Jul 29 '13 at 11:30
  • 1
    @TimBüthe 1024KB (1MB). – CrazyCoder Jul 29 '13 at 11:31
  • What will happen if I will disable it? – Igor Konoplyanko Dec 16 '13 at 17:08
  • 1
    @IgorKonoplyanko the buffer will fill until OutOfMemoryError. – CrazyCoder Dec 16 '13 at 17:13
  • 63
    This would be a great setting for IDEA to put into the Config/Settings UI. Like Eclipse has it. Would that be too "intelligent"? – Thomas W Jan 05 '14 at 22:31
  • 6
    For me on mac this file was located at `/Applications/IntelliJ IDEA 14 CE.app/Contents/bin/idea.properties` – rogerdpack Feb 04 '15 at 18:19
  • For my distro (Arch), `idea.properties` is located at `/usr/share/intellij-idea-ultimate-edition/bin/idea.properties`. Note that for Linux (unlike Mac) you don't need to create a copy of this file. – Babken Vardanyan May 12 '15 at 13:18
  • 2
    Go to https://youtrack.jetbrains.com/issue/IDEA-63980 to vote for this to become a true preference! – rogerdpack May 29 '15 at 23:52
  • 2
    At least by version 14, there is a comment: "Older lines are deleted. In order to disable cycle buffer use idea.cycle.buffer.size=disabled". This works perfectly. – Russ Bateman Aug 24 '15 at 17:19
  • 2
    On OSX I had to copy that file from /Applications/IntelliJ IDEA 14.app/Contents/bin/idea.properties to ~/Library/Preferences/IntelliJIdea14/idea.properties Otherwise it wouldn't react on the change – Oleg Mikheev Oct 16 '15 at 19:10
  • 2
    Settings > Editor > General > Console > "Override console cycle buffer size (1024kb) {enter a value}" – BBW Before Windows Jul 31 '16 at 17:09
  • @ThomasW Seeing that IntelliJ have now added this to feature since your comment... – atlas_scoffed Feb 06 '19 at 03:04
  • FYI I set my buffer size to about 1G and it causes IDEA to lag like crazy. Eventually it gave me a popup asking to increase the memory. So you'll want to do that. I set mine to 2G. On the Help menu, click Edit Custom VM Options. Set the -Xmx option to a higher value and restart IntelliJ IDEA. – jgreen Jul 11 '19 at 02:28
  • 2
    @ThomasW - Would it be better if inteliij did not truncate logs by default ? My colleague saw some errors in a script logs, but I did not because my logs were getting truncated. A bit frustrating. – MasterJoe Aug 14 '19 at 16:40
  • 3
    I set the console buffer size to 102400kb but still can only get part of the info in the console, is there a way that I can store all the running process in one file? – Cecilia Nov 07 '19 at 15:06
40

This can (now) be edited in the Intellij IDEA settings.

Intellij IDEA Settings: Console

This has probably been in Intellij IDEA for a while, and certainly is as of Intellij IDEA 15.

amaidment
  • 6,942
  • 5
  • 52
  • 88
  • Not in the latest Webstorm (and presumably not in other IntelliJ applications other than IntelliJ itself). C'mon Jetbrains, why the hate for people using non-Java languages? – machineghost Jul 26 '16 at 18:29
16

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.

Dario Seidl
  • 4,140
  • 1
  • 39
  • 55
Adil Qureshi
  • 177
  • 1
  • 2
4

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.

  • This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://stackoverflow.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://stackoverflow.com/help/whats-reputation), you can also [add a bounty](https://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question. – Mousam Singh Aug 30 '21 at 15:28
  • 1
    @MousamSingh How does this not answer the question? – Yitzchok Ginzberg Dec 07 '21 at 15:22
  • 2
    @MousamSingh This does answer the question. This is the only answer that worked for me in Rider to get more lines in the Run output window. – knightofiam Sep 23 '22 at 01:14
3

With IntelliJ 11 (on the Mac at least), this setting is configured instead in Info.plist:

IDEA_HOME/Contents/Info.plist

There should already be a value there so just modify it instead of adding a new one.

rogerdpack
  • 62,887
  • 36
  • 269
  • 388
Chris Williams
  • 11,647
  • 15
  • 60
  • 97
  • 8
    Be careful with IDEA 12 and later, it should be modified in a copy of `idea.properties` file, [more details here](http://intellij-support.jetbrains.com/entries/23395793). – CrazyCoder Jul 29 '13 at 11:32
1

You could use this shortcut

Ctrl + Shift + A

then search "Override console cycle buffer size" to get to the settings.

N Dev
  • 31
  • 2
1

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.

enter image description here

Hubert Grzeskowiak
  • 15,137
  • 5
  • 57
  • 74