vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

PowerShell debug console doesn't word wrap correctly

Open codemonkeychris opened this issue 11 years ago • 11 comments

If you issue a command line "gci", the terminal output is word wrapped to a very narrow window, instead of occupying the full space available. If you resize the window, the output doesn't adjust.

codemonkeychris avatar Nov 18 '15 16:11 codemonkeychris

Yep, I've been talking to the VS Code team about this, hopefully we'll get some improvements for long output lines in the next release.

daviwil avatar Nov 18 '15 17:11 daviwil

Tracked in the VS Code repo with this issue:

https://github.com/Microsoft/vscode/issues/255

daviwil avatar Nov 19 '15 15:11 daviwil

This issue is really important. It makes VS Code almost unusable for PowerShell use in my opinion.

kliemohn avatar Nov 25 '15 14:11 kliemohn

I agree, it makes the console pretty useless when you can't see multi-line output from a command. Hopefully the VS Code team will get this fixed for their next release.

daviwil avatar Nov 26 '15 16:11 daviwil

Hi guys, this situation should improve a lot in the upcoming 0.10.7 and 0.4.0 releases of VS Code and the PowerShell extension. Once those are out I'll comment back here so you can go try it out and let me know what you think.

daviwil avatar Feb 03 '16 15:02 daviwil

It is definitely better but the output seems to be wrapping at column 80 and my Debug Console window is much wider than that.

    Directory: C:\Users\Keith\GitHub\rkeithhill\PowerShellEditorServices\src\Po
    werShellEditorServices.Host\bin\Debug


Mode                LastWriteTime         Length Name                          
----                -------------         ------ ----                          
               2/2/2016  10:46 PM         114427 DebugAdapter.log              
               2/2/2016  10:35 PM        1101753 EditorServices.log            
-a----         2/2/2016  10:35 PM         118272 Microsoft.PowerShell.EditorSer
                                                 vices.dll 

If we can't detect the column width of the output window perhaps we make this a debug setting the user can set in their preferences (I would default it to 120). Then we run output through something like Out-String -Width <n>.

rkeithhill avatar Feb 03 '16 16:02 rkeithhill

That's a great point actually, we should add a config setting for that. In the meantime I'll increase the width of the virtual console. What would be a good default width, 100? 120?

daviwil avatar Feb 03 '16 16:02 daviwil

Filed an issue for the configuration setting here: https://github.com/PowerShell/vscode-powershell/issues/80

daviwil avatar Feb 03 '16 16:02 daviwil

Also created this issue for increasing the default console width: https://github.com/PowerShell/PowerShellEditorServices/issues/129

daviwil avatar Feb 03 '16 16:02 daviwil

Given the horizontal debug window in 0.10.7, I suggest 120.

rkeithhill avatar Feb 03 '16 18:02 rkeithhill

Keith has fixed this in PowerShell Editor Services, you should have better output wrapping in the 0.4.0 release next week!

daviwil avatar Feb 05 '16 04:02 daviwil