Skip to content

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

Closed

Description

@rjgotten
  • 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 Add option to disable line wrap on debug console #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.

Activity

  1. jamesgregson commented on Nov 7, 2019

    @jamesgregson

    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!

  2. added
    debug
    on Nov 14, 2019
  3. added
    bug
    on Nov 20, 2019
  4. isidorn commented on Nov 20, 2019

    @isidorn

    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);
    
  5. added
    verified
    on Dec 5, 2019
  6. added
    on-release-notes
    on Dec 6, 2019
  7. locked and limited conversation to collaborators on Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugdebugon-release-notesverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions