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

No debug logs on MAUI when launching within Visual Studio #3341

Open
bruno-garcia opened this issue Apr 30, 2024 · 2 comments · May be fixed by #3373
Open

No debug logs on MAUI when launching within Visual Studio #3341

bruno-garcia opened this issue Apr 30, 2024 · 2 comments · May be fixed by #3373
Assignees

Comments

@bruno-garcia
Copy link
Member

From a customer cc @JLuse

Similar to ASP.NET (.NET Framework), developers usually run the app from within Visual Studio and there's no console anywhere.
To get the data within the debugging panels of Visual Studio, one can't use Console.WriteLine. And instead requires Trace.WriteLine.

We're aware of that and changed the default on ASP.NET:

options.DiagnosticLogger ??= new TraceDiagnosticLogger(options.DiagnosticLevel);

We need to at least document this for MAUI users on Visual Studio. Or, if we can, figure out at runtime if we're on Visual Studio or not and toggle between Console and Trace.

@jamescrosswell
Copy link
Collaborator

We need to at least document this for MAUI users on Visual Studio. Or, if we can, figure out at runtime if we're on Visual Studio or not and toggle between Console and Trace

Could we create a ConsoleAndTraceDiagnosticLogger and use that as default? That would work everywhere right?

@bitsandfoxes
Copy link
Contributor

Would that logger be aware of where to output stuff? Or just write to both?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants