How to use Diagnostic Tools for MAUI app on Android?

124 views Asked by At

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 ?

2

There are 2 answers

0
Liyun Zhang - MSFT On BEST ANSWER

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

0
jason.kaisersmith On

You could take a look at Sentry

It supports a wide range of languages and platforms.

I use for exception handling in my .Net MAUI apps (which are not commerical, and just for my use), but I know that it also has performance tracking capability which you might find useful.

More details here:

https://sentry.io/for/dot-net/?original_referrer=https%3A%2F%2Fwww.google.co.uk%2F&platform=sentry.dotnet.maui