1

Visual studio code displays the output of CMake/Build without breaking long lines at window width, something like:

[build] FAILED: /path/to/the/source/code/that/caused/the/error/long_source_file_name_with_description_of_functionality.cpp  This is the reason why compilation stopped etc etc etc ... In member function 'void MyFunction(int arg1, double arg2)'

The community edition has a button called "Toggle Word Wrap" to give you the option to break those lines, i.e. make them fit to the console width, for example the previous message would appear as:

[build] FAILED: /path/to/the/source/code/that/caused/the/error/
long_source_file_name_with_description_of_functionality.cpp  This is the 
reason why compilation stopped etc etc etc ... In member 
function 'void MyFunction(int arg1, double arg2)'

Is this possible in Visual Studio code?

Edit: There is this question where the setting "editor.wordWrap": "on" is described but there doesn't seem to exist an equivalent for the Output View, i.e. "output.wordWrap": "on" is not a valid setting.

Scheff's Cat
  • 19,528
  • 6
  • 28
  • 56
Lorah Attkins
  • 5,331
  • 3
  • 29
  • 63
  • how are you running cmake? – Alan Birtles May 19 '21 at 09:44
  • @AlanBirtles Through the UI, by clicking the Build button. I'm using the CMake extension and have previously configured an "Active Kit". Are you thinking this is possible to setup up as a CMake configuration?? – Lorah Attkins May 19 '21 at 09:47

1 Answers1

2

Was able to find a solution through a Python related question. The setting to tweak is this:

"[Log]": {
    "editor.wordWrap": "on"
}
Lorah Attkins
  • 5,331
  • 3
  • 29
  • 63