Search code examples
c#androidvisual-studiomauidiagnostics

How to use Diagnostic Tools for MAUI app on Android?


I am familiar with the Diagnostic Tools for .NET applications, and I am trying to use it to debug a MAUI application running on Android. However the Diagnostic Tools window shows:

The Diagnostic Tools window does not support the current debugging configuration.

How can I trace memory/cpu usage in a MAUI app in the context of running on an Android physical device ? Is that possible, or is there another recommended tool for that ?


Solution

  • You can use the Android Studio to trace memory/cpu usage of your application.

    First of all, you can refer to the official document about Inspect your app's memory usage with Memory Profiler.

    And then, you can still use the Visual Studio to debug the Maui application on the physical android device but trace the memory/cpu usage of your application in the Android Studio.

    1. Attach your application debug process to the android studio profile.

    enter image description here

    1. Trace memory/cpu usage of your application.

    enter image description here