Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling console.debug.wordWrap strips newlines and whitespace #83753

Closed
rjgotten opened this issue Oct 31, 2019 · 2 comments
Closed

Disabling console.debug.wordWrap strips newlines and whitespace #83753

rjgotten opened this issue Oct 31, 2019 · 2 comments

Comments

@rjgotten
Copy link

@rjgotten rjgotten commented Oct 31, 2019

  • VSCode Version: 1.39.2
  • OS Version: win 10 1803

Expected Behavior:
The debug console stops automatically inserting linebreaks to fit messages to screen width.
The debug console does not remove linebreaks and any other white-space that may already be present in the log messages.

Actual Behavior:
It just strips everything, including what was already present in the log messages itself.

Steps to Reproduce:

  1. Disable debug console line wrapping using the console.debug.wordWrap setting introduced for #72210
  2. Restart VSCode to apply the setting.
  3. Load up and debug an ASP.NET Core solution.
  4. Note that in the debug console all newlines inside a single log message are now removed. (And it also seems to strip atleast leading whitespace.)

Does this issue occur when all extensions are disabled?
Can't verify. Above reproduction needs the Omnisharp extension installed.

@jamesgregson

This comment has been minimized.

Copy link

@jamesgregson jamesgregson commented Nov 7, 2019

I see this behaviour with the Python extension as well so it seems more general than ASP.NET.

Here's a minimal example case, set a breakpoint where indicated and debug to reproduce:

string_to_print = '   this   is   a   string   to   print'
print( string_to_print )

print('set breakpoint here')

'Debug Console' output is:

this is a string to print

while 'Terminal' output is correct:

   this   is   a   string   to   print

I don't think this is specifically an issue with 'debug.console.wordWrap' since it occurs regardless of the value of that setting.

VSCode: Version: 1.40.0
Commit: 86405ea
Python: 3.5.2
Ubuntu 16.04

Unfortunately it makes debugging numerical code nearly impossible since numpy arrays all print as a single line, regardless of dimension and number of elements. Ironically the debug.console.wordWrap feature is why I upgraded to get unwrapped printing of large arrays.

Cheers and thanks for all your work on this great tool!

@isidorn isidorn added the debug label Nov 14, 2019
@isidorn isidorn added this to the November 2019 milestone Nov 14, 2019
@isidorn isidorn added the bug label Nov 20, 2019
@isidorn isidorn closed this in e3ad849 Nov 20, 2019
@isidorn

This comment has been minimized.

Copy link
Contributor

@isidorn isidorn commented Nov 20, 2019

@jamesgregson thanks for the nice steps. I have pushed the fix to vscode insiders and you can try out in tomorrow's vscode build.

To verify, debug.console.wordWrap:false and debug the following nodejs program and make sure the string is correctly rendered in the debug console

var string_to_print = '   this   is   a   string   to   print'
console.log(string_to_print);
@roblourens roblourens added the verified label Dec 5, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants
You can’t perform that action at this time.