tryphotino / photino.Samples

https://tryphotino.io
Apache License 2.0
103 stars 26 forks source link

`Console.WriteLine(@"Test");` and `DebugWriteLine(@"Test");` are not sent to `DevTools - app` #12

Closed Smurf-IV closed 3 years ago

Smurf-IV commented 3 years ago

They are also not captured by Visual Studio, but can be captured by a ProcessHandler that redirects StdOut.

This is not as expected for Blazor applications, as Devs are used to the Console output going to the "F12" (or Ctrl+Shf+I devtools)

ottodobretsberger commented 3 years ago

This kind of console output by default works in Blazor WASM, but since we're not executing Blazor WASM in the browser, Photino doesn't provide that feature yet. With JS interop a wrapper for browser logging could be written though, SO thread for reference: https://stackoverflow.com/questions/60992581/how-can-i-write-into-the-browser%C2%B4s-console-via-blazor-webassembly

A more general and better approach or solution would be to enhance the JS Interop on the level of Photino.Native to provide this functionality to all Photino projects alike. Ref: https://github.com/tryphotino/photino.Native/issues/46

Smurf-IV commented 3 years ago

Why was this closed ? I want to use it C# / .net nothing to do with Natvie code base !