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

Console.WriteLine() does not result in an empty line anymore. #70962

Closed
StasD opened this issue Mar 22, 2019 · 12 comments
Closed

Console.WriteLine() does not result in an empty line anymore. #70962

StasD opened this issue Mar 22, 2019 · 12 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@StasD
Copy link

StasD commented Mar 22, 2019

  • VSCode Version: 1.32.3
  • OS Version: macOS 10.14.3
  • .NET Core SDK Version: 2.2.105

Steps to Reproduce:

  1. use Console.WriteLine() without arguments or with empty string argument in c# code
    (put a call to Console.WriteLine() without arguments between Console.WriteLine() with arguments, so that the behavior is obvious)
  2. see what it outputs in the debug console (Currently it has no effect, while it should be an empty line)

Does this issue occur when all extensions are disabled?: N/A (c# extension has to be enabled anyway)

It used to work with previous versions of VS Code and .NET SDK (resulted in proper empty line in the console).

@weinand weinand assigned isidorn and unassigned weinand Mar 22, 2019
@weinand weinand added debug Debug viewlet, configurations, breakpoints, adapter issues debug-console labels Mar 22, 2019
@weinand
Copy link
Contributor

weinand commented Mar 22, 2019

@isidorn a regression?

@isidorn
Copy link
Contributor

isidorn commented Mar 22, 2019

Should be fixed in latest
@StasD can you reproduce with latest vscode insiders https://code.visualstudio.com/insiders/

Similar issue #69535

@isidorn isidorn added the info-needed Issue requires more information from poster label Mar 22, 2019
@StasD
Copy link
Author

StasD commented Mar 22, 2019

Hi,
No, it did not work with the insider version, either.
But, when I downloaded the previous version (1.31.1), it worked properly, as before.

On a side note, the insider version did not pick up any of my settings (despite that I renamed the .app file / folder to match the normal one before moving it to 'Applications'), which is annoying...

@isidorn
Copy link
Contributor

isidorn commented Mar 22, 2019

I can not reproduce this with node. So I would ask you to please file this against C#
emptyLine

Please file against C# and they can investigate more from their side if they are doign something special. Thank you
https://github.com/OmniSharp/omnisharp-vscode

@isidorn isidorn closed this as completed Mar 22, 2019
@isidorn
Copy link
Contributor

isidorn commented Mar 22, 2019

My mistake. I can reproduce when there is no source linked with the output. Reopening and investigating....

@isidorn isidorn reopened this Mar 22, 2019
@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Mar 22, 2019
@isidorn isidorn added this to the March 2019 milestone Mar 22, 2019
@isidorn
Copy link
Contributor

isidorn commented Mar 22, 2019

The issue here is that we started using dynamic heights for the tree in the debug console.
So the tree gives an empty element a dynamic height of 0 which makes it invisible.
As a fix all elements that do not have content I set to not have dynamic height.

fyi @joaomoreno

@StasD
Copy link
Author

StasD commented Mar 22, 2019

OK, hope it will work properly in the next version!

Also, why did you investigate it using console.log()? It's JavaScript code, right? While I was talking about C#'s Console.WriteLine().

I.e. you create a folder somewhere (called e.g. 'console1'), then cd to it in the Terminal, then run 'dotnet new console', then open the resulting project in VS code, change
Console.WriteLine("Hello World!");
into
Console.WriteLine("Hello");
Console.WriteLine();
Console.WriteLine("World!");
then go to Debug tab and just click the green triangle there to run it. :)

@isidorn
Copy link
Contributor

isidorn commented Mar 22, 2019

Javascript is easier for my personal setup.
Yes the next release will have the fix. In the meantime you can use vscode insiders which will have the fix starting on Monday https://code.visualstudio.com/insiders/

@StasD
Copy link
Author

StasD commented Mar 22, 2019

Cool. Thanks!
But for now it is perhaps easier for me to just change to Console.WriteLine(" "); which works OK. :)

@octref
Copy link
Contributor

octref commented Mar 27, 2019

@isidorn How to setup for "no source linked with the output"?

@octref octref added the verification-steps-needed Steps to verify are needed for verification label Mar 27, 2019
@isidorn
Copy link
Contributor

isidorn commented Mar 28, 2019

@octref use some debugger that is not node, for exampe python, go, c#
An alternative is to verify out of source and set this sourceData to undefined here

@octref octref removed the verification-steps-needed Steps to verify are needed for verification label Mar 28, 2019
@octref
Copy link
Contributor

octref commented Mar 28, 2019

Verified in Python debugger.

@octref octref added the verified Verification succeeded label Mar 28, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators May 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants