From cbb9939f5e6e19afa3bd7f860c72b055f20d01af Mon Sep 17 00:00:00 2001 From: Filip Ekberg Date: Fri, 24 Oct 2025 09:29:24 +0200 Subject: [PATCH 1/2] Add quickstart guide for Android memory dump Added quickstart instructions for creating a memory dump on Android devices. --- Documentation/guides/tracing.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Documentation/guides/tracing.md b/Documentation/guides/tracing.md index fdf394f926e..b6ac8e7e1af 100644 --- a/Documentation/guides/tracing.md +++ b/Documentation/guides/tracing.md @@ -60,6 +60,21 @@ You can invoke the tool using the following command: dotnet-trace Tool 'dotnet-trace' was successfully installed. ``` +## Quickstart (Android Device) +**Do not run the app through Visual Studio**, the app freezes on the splash screen. + +Run the following commands to create a memory dump of the app: + +1. `dotnet build -c Release -p:AndroidEnableProfiler=true .\MyApp.csproj` +2. `adb install .\bin\Release\net9.0-android\MyApp-Signed.apk` +3. `dotnet-dsrouter android` +4. `adb shell setprop debug.mono.profile '127.0.0.1:9000,nosuspend'` +5. Start the app on your device +6. `dotnet-gcdump ps to find the PID` +7. `dotnet-gcdump collect -p PID` + +This will create a `.gcdump` file wich you can open in Visual Studio. + ## Configuration & Setup ### Using `dotnet-trace` with the `--dsrouter` option From 4b702b643457c4d388483fb718af379d5525e556 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Tue, 28 Oct 2025 12:40:33 -0500 Subject: [PATCH 2/2] Apply suggestion from @dartasen Co-authored-by: dartasen <10561268+dartasen@users.noreply.github.com> --- Documentation/guides/tracing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/guides/tracing.md b/Documentation/guides/tracing.md index b6ac8e7e1af..4741b7b0372 100644 --- a/Documentation/guides/tracing.md +++ b/Documentation/guides/tracing.md @@ -70,7 +70,7 @@ Run the following commands to create a memory dump of the app: 3. `dotnet-dsrouter android` 4. `adb shell setprop debug.mono.profile '127.0.0.1:9000,nosuspend'` 5. Start the app on your device -6. `dotnet-gcdump ps to find the PID` +6. `dotnet-gcdump ps` to find the PID 7. `dotnet-gcdump collect -p PID` This will create a `.gcdump` file wich you can open in Visual Studio.