dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.38k stars 4.75k forks source link

[Blazor WebAssembly] Console.Write does not write anything until a new line is written #59184

Open pranavkm opened 3 years ago

pranavkm commented 3 years ago

Description

This is specifically with Console.Write / Console.WriteLine appears to work as expected. Essentially any number of Console.Write invocations appear to be buffered until it encounters a new line.

To reproduce:

Configuration

Reproduced using runtime version 6.0.0-rc.2.21460.8

ghost commented 3 years ago

Tagging subscribers to this area: @dotnet/area-system-console See info in area-owners.md if you want to be subscribed.

Issue Details
### Description This is specifically with `Console.Write` / `Console.WriteLine` appears to work as expected. Essentially any number of `Console.Write` invocations appear to be buffered until it encounters a new line. To reproduce: * `dotnet new blazorwebassembly` * Use a `Console.Write("Hello world")` before the call to `RunAsync` * Notice it never appears in the browser console ### Configuration Reproduced using runtime version 6.0.0-rc.2.21460.8
Author: pranavkm
Assignees: -
Labels: `area-System.Console`, `untriaged`
Milestone: -
ghost commented 3 years ago

Tagging subscribers to 'arch-wasm': @lewing See info in area-owners.md if you want to be subscribed.

Issue Details
### Description This is specifically with `Console.Write` / `Console.WriteLine` appears to work as expected. Essentially any number of `Console.Write` invocations appear to be buffered until it encounters a new line. To reproduce: * `dotnet new blazorwebassembly` * Use a `Console.Write("Hello world")` before the call to `RunAsync` * Notice it never appears in the browser console ### Configuration Reproduced using runtime version 6.0.0-rc.2.21460.8
Author: pranavkm
Assignees: -
Labels: `arch-wasm`, `area-System.Console`, `untriaged`
Milestone: -
lewing commented 3 years ago

I'm not sure there is actually any way to fix this in the browser without inserting extra newlines