question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot debug or show output of Release built application on Android

See original GitHub issue

Description

Release build for Android takes 2.5 minutes to build and run for Android on i7 6700 HQ and fast SSD for the template MAUI Blazor project. Moreover, this message started showing. Reinstalling VS did not help (completely, all versions including VS Installer), resetting settings did not help. Shows also for new apps created from template.

Start debugging Android application ...
> am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "com.companyname.mauiapp3/crc64e73e5e987e2fb5cd.MainActivity"
> Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.companyname.mauiapp3/crc64e73e5e987e2fb5cd.MainActivity }

Android application is running (debug is disabled in android project properties).

Yesterday with RC 1, I have been able to show output of 1 Release run of my Blazor MAUI app which showed this error which also probably causes my MAUI Blazor application to crash on Release build. This Error type 3 crash on startup can be solved using <PublishTrimmed>False</PublishTrimmed>.

image

Since then, all the time: Android application is running (debug is disabled in android project properties). for all projects. There is no such setting to Enable/Disable debugging in Android project properties. And thus I cannot see any output and cannot watch Trace.WriteLine output or watch what caused application crash when in Release mode. And adding <DebugSymbols>True</DebugSymbols> to .csproj does not solve the issue.

Default settings for all my projects look like this: image

I need to diagnose the error to report it. Please help me what to do to get debugging back for Release build.

Steps to Reproduce

create new maui app press run on android in Release mode image

Version with bug

Release Candidate 2 (current)

Last version that worked well

Release Candidate 1

Affected platforms

Android

Affected platform versions

Android 11 (API 30)

Did you find any workaround?

no

Relevant log output

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:23 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
jonathanpepperscommented, May 6, 2022

Yes, I don’t see log messages in the minimized one like:

05-06 21:49:12.737 12213 12213 D Mono    : ...
05-06 21:49:12.737 12213 12213 D monodroid-assembly: ...
05-06 21:49:12.737 12213 12213 I monodroid-timing: ...

Android logs random stuff all the time, so that is what is in there now.

1reaction
jonathanpepperscommented, May 6, 2022

This looks like it might be duplicate of: https://github.com/dotnet/runtime/issues/67402

The fix for this will be shipping soon, let us check back with you when it’s available.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not Able To Debug App In Android Studio
I solved this issue after doing the following steps: Go to Tools==>android==>Disable ADB integration and enable it again.
Read more >
Debug your app | Android Studio
If the Debug window isn't open, select View > Tool Windows > Debug, or click Debug in the tool window bar. Attach the...
Read more >
Debug pre-built APKs | Android Studio
In Android view, under the cpp directory in the Project window, double-click a native library file that doesn't include debug symbols. The ...
Read more >
Build your app from the command line | Android Studio
Find out how you can execute all the build tasks available to your Android project using the Gradle wrapper command line tool.
Read more >
Prepare your app for release | Android Studio
Learn how to build a signed, release-ready APK. This process is the same for all Android apps.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found