'Debugging MAUI app on Android after manual launch

I have a MAUI app on Android which works perfectly when launched from Visual Studio with the debugger attached. If I published an APK and install it on the device manually, the application crashes as soon as I use the AppShell to change the current page.

How can I attach the debugger to it after I've launched it manually? Failing that, just finding a way to see a stack trace for the unhandled exception would be a big step forward.

I tried capturing a bug report and reproducing the crash, but the report did not appear to contain any account of crash. I was unable to find any crash dump logged by the OS, but this is my first Android app, so I might be missing something there.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source