-
Notifications
You must be signed in to change notification settings - Fork 832
docs: Add comprehensive Logcat setup and debugging instructions for Android #21984
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
…udio Co-authored-by: Jen-Uno <[email protected]>
|
|
…mple Co-authored-by: Jen-Uno <[email protected]>
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
| ```csharp | ||
| using Microsoft.Extensions.Logging; | ||
|
|
||
| public App() | ||
| { | ||
| #if __ANDROID__ | ||
| // Enable verbose logging for Uno Platform | ||
| Uno.UI.Adapter.Microsoft.Extensions.Logging.LoggingAdapter.MinimumLevel = LogLevel.Trace; | ||
| #endif | ||
|
|
||
| this.InitializeComponent(); | ||
| } | ||
| ``` |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code example references a non-existent API LoggingAdapter.MinimumLevel. Based on the actual implementation in src/Uno.UI.Adapter.Microsoft.Extensions.Logging/LoggingAdapter.cs and usage patterns in src/SamplesApp/SamplesApp.Shared/App.xaml.cs (lines 454-540), the correct way to configure Uno Platform logging is:
using Microsoft.Extensions.Logging;
public App()
{
#if __ANDROID__
var factory = Microsoft.Extensions.Logging.LoggerFactory.Create(builder =>
{
builder.AddConsole();
builder.SetMinimumLevel(LogLevel.Trace);
builder.AddFilter("Uno", LogLevel.Trace);
builder.AddFilter("Windows", LogLevel.Trace);
builder.AddFilter("Microsoft", LogLevel.Trace);
});
Uno.Extensions.LogExtensionPoint.AmbientLoggerFactory = factory;
global::Uno.UI.Adapter.Microsoft.Extensions.Logging.LoggingAdapter.Initialize();
#endif
this.InitializeComponent();
}This follows the standard Microsoft.Extensions.Logging configuration pattern used throughout the codebase.
GitHub Issue: closes #18515
PR Type:
📚 Documentation content changes
What is the current behavior? 🤔
The "How to Create a Repro" documentation lacks Android-specific Logcat setup and access instructions, making it difficult for developers to debug Android issues and capture proper logs when reporting bugs.
What is the new behavior? 🚀
Adds comprehensive "Android Debugging with Logcat" section with IDE-specific instructions:
Visual Studio
JetBrains Rider
VS Code
Common Tips
Also adds cross-reference link from the debugging tips section (line 34) to the new Logcat section.
PR Checklist ✅
Other information ℹ️
Related to #21977. All markdown syntax validated: 8 balanced code block pairs, 6 properly formatted tab sections.
Original prompt
Summary
Add comprehensive Logcat setup and access instructions for Android debugging across VS Code, JetBrains Rider, and Visual Studio to the "How to Create a Repro" documentation.
What
This change adds a new "Android Debugging with Logcat" section to
doc/articles/uno-howto-create-a-repro.mdwith:Why
The existing documentation lacks essential Logcat setup instructions, making it difficult for developers to debug Android issues when creating reproducible examples. This is especially important for:
Which issue
Fixes #18515
Related to #21977
Changes Required
1. Update
doc/articles/uno-howto-create-a-repro.mdInsert after line 41 (in the debugging tips section):
Add a new section titled "## Android Debugging with Logcat" with three IDE-specific tabs:
Visual Studio Tab
Rider Tab
VS Code Tab
Common Tips Section (All IDEs)
App.xaml.csUpdate line 36 to add cross-reference:
Change the bullet point about analyzing logs to include:
Complete Section Content