When I log an exception in my MAUI App (Android), the stacktrace doesn't contain line numbers (only if the debugger is attached!). I need stacktrace line numbers in release builds without attached debugger.
Is this still not possible? / do I still have to use use mono-symbolicate to convert stacktraces? https://github.com/xamarin/release-notes-archive/blob/master/release-notes/android/xamarin.android_7/xamarin.android_7.4/index.md#file-name-and-line-number-information-in-release-builds)
MainPage.xaml.cs (new MAUI App from default template)
private void OnCounterClicked(object sender, EventArgs e)
{
try
{
throw new Exception("test");
}
catch (Exception ex)
{
Console.WriteLine("Exception: {0}", ex);
}
}
Output with debugger
01-09 20:12:28.740 31662 31662 I DOTNET : Exception: System.Exception: test
01-09 20:12:28.740 31662 31662 I DOTNET : at ExceptionLineNumberTest.Maui.MainPage.OnCounterClicked(Object sender, EventArgs e) in /Users/xxxx/Projects/ExceptionLineNumberTest.Maui/ExceptionLineNumberTest.Maui/MainPage.xaml.cs:line 27
Output without debugger
01-09 20:13:07.055 32175 32175 I DOTNET : Exception: System.Exception: test
01-09 20:13:07.055 32175 32175 I DOTNET : at ExceptionLineNumberTest.Maui.MainPage.OnCounterClicked(Object sender, EventArgs e)