VS Code 1.86+ answer
Toggling word wrapping in the Output View is now supported via the View: Toggle Word Wrap
command when the Output View is focused. That command is bound by default to alt/opt+z.
Pre-1.86 answer
Output Channels can have an associated language mode (see createOutputChannel(name: string, languageId?: string): OutputChannel
in the extension API docs), but most of them use the other function overload, createOutputChannel(name: string, options: {log: true}): LogOutputChannel
, which uses the specially defined "log" language mode. What you need to do is find out what language mode is being used in the output channels of interest, and then override the editor.wordWrap
setting just for those languages.
To handle the basic cases of the "log" language mode, try putting something akin to the following in your settings.json file:
"[log][Log]": {
"editor.wordWrap": "on",
}
You can add other language modes to the above list as needed. See also https://code.visualstudio.com/docs/getstarted/settings#_language-specific-editor-settings.
Other related source code for the log
/Log
language mode IDs for when VS Code uses them can be found in relation to src/vs/workbench/services/output/common/output.ts, where OUTPUT_MODE_ID
and LOG_MODE_ID
are defined. Also interesting is the fact that their language support extension defines Log
as an alias of log
, but they are registered separately in src/vs/workbench/contrib/output/browser/output.contribution.ts, which I think is why in my experience, you need to specify "[log][Log]":
instead of just "[log]":
in the language override setting.