Ok guys. Seriously, it's been 5+ years since I started developing Xamarin Android apps and STILL there is no way to get line numbers in the crash reports. There were half-hearted attempts to solve the problem with mono-symbolicate (which never worked for me, even with the assistance of Xamarin support), however this is something that should work out of the box, you shouldn't have to jump through hoops and have manual steps to get it to work.
Each release when crashes start getting logged, all it gives me is which function it was called in (and if I'm lucky, if it was within some sort of thread or callback within that function.) Beyond that, it's a total stab in the dark what the exception is, especially if it's a NullReferenceException. What I end up having to do is add all of this custom code into the function in order to properly diagnose which line is causing the issue, then release that, then I can fix it for the release after that (really a 3 release process.) The alternative is to blindly add null checks on every object in the function, which can really muck up the code.
Xamarin is a Microsoft product. App Center is a Microsoft product. And yet even there, no line numbers in the crash reports. We're all .NET developers here, and in any other .NET product we've had line numbers in the exceptions (so long as we included the pdb's) since .NET 1.0. It's 2019 now, soon to be 2020, and no progress has been made on this on the Xamarin front. This seems completely unacceptable to me, that you've ignored all of us screaming for this for years. How many hundreds of thousands of developer hours have been wasted trying to troubleshoot crash reports over this? Please reevaluate your priorities and get this fundamental feature delivered, before you lose all of your developers to other mobile products that do listen to their developers.
I have some sympathies for this, although I have at least got results from mono-symbolicate (although it is far from user friendly). I would have thought that the 'Archives' feature could be expanded to link with appCenter. All the info is there that is required (pdbs, apk, crash reports), so it would be great if it could all be put together in Visual Studio to give a listing of symbolicated crashes for each archive.
@jonathanpeppers
Any update on this? This is a very important feature.
Yes Ins a PITA to find errors on production!
Everyone that needs this for App Center, please comment on: https://github.com/Microsoft/appcenter/issues/324
For now, it seems your options are:
.msym files yourself along with your .apk/.aab on CI. You would probably have to use full Azure DevOps instead of App Center.mono-symbolicate when you need to find the line numbers for a crash.We are going to improve docs around symbolication, as I wasn't able to find a good doc that explains how to use it with Xamarin.Android. /cc @dellis1972
If you want to archive the .msym files with app center builds right now, using a post-build script to upload them somewhere is an option as well.
I found a brief example of mono-symbolicate here:
https://github.com/xamarin/release-notes-archive/blob/master/release-notes/android/xamarin.android_6/xamarin.android_6.1/index.md#adding-resources-to-the-default-project
Scroll down to File name and line number information in release builds.
Most helpful comment
I found a brief example of
mono-symbolicatehere:https://github.com/xamarin/release-notes-archive/blob/master/release-notes/android/xamarin.android_6/xamarin.android_6.1/index.md#adding-resources-to-the-default-project
Scroll down to
File name and line number information in release builds.