How can I expand the max width of the Run Tool Window in Clion/Intellij?
Asked Answered
F

2

10

As you can see, there's plenty of space for the text to expand to the right, but it gets wrapped at 120 characters. I have tried turning off soft wrapping (the little button on the right side), I tried going into the settings, under editor -> general -> console, unchecking "use soft wraps in console", and increasing the "console commands history size", but none of these have worked. I'd like for the cout of my program to continue to the right, and ideally just make a horizontal scroll bar rather than wrapping or truncating. Is there a way to do this in CLion/Intellij?

Frons answered 11/9, 2018 at 4:31 Comment(2)
Do you get this in IntelliJ iDEA also? Sound like CLion-specific: youtrack.jetbrains.com/issue/CPP-10624.Colewort
I never saw this in intellij...Upandcoming
S
24

120 is the default value for windows console. To change the value 1. you can set the OS-wide system variable CONSOLE_WIDTH. 2. setup CONSOLE_WIDTH inside you run configuration:

Configuration editor

then Registry... (aka Help -> Find action -> Registry...) got to be invoked to opt out value of run.processes.with.pty

Registry...

Shilohshim answered 12/9, 2018 at 7:54 Comment(7)
How exactly do I do this? What do you mean by OS-wide variable console_width?Frons
In CLion: Edit Configurations...|Run/Debug Configuration, choose the Application you like to adjust, add the line CONSOLE_WIDTH=200. In Window OS: please call set CONSOLE_WIDTH=200 somewhere in start scripts, system or user profile. Please, read OS documentation for details.Shilohshim
This seems to not work lately. Using MSVC for toolchain here. Any hints how to get it "working" ?Hanshansard
Did you turn off in Registry... run.processes.with.pty [ ]?Shilohshim
Brilliant, thank you. Worked great in Clion 2020.1 on Windows 10 using CMake and MinGWAlchemist
In PHPStorm 2019.3.4 I also disabled run.anything.use.pty option and now console width is ok.Pinon
does not work on IntelliJ IDEA 2024Expanded
E
-3

Using PyCharm, I had this issue when running commands automatically generated from my Makefile, and the CONSOLE_WIDTH=200 solution didn't work.

In the end, what did work was to tick the Use Cygwin option in Build, Execution, Deployment > Build Tools > Make:

"Use Cygwin" tickbox in Settings

Earle answered 14/7, 2021 at 13:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.