Skip to content

Conversation

@fekberg
Copy link
Contributor

@fekberg fekberg commented Oct 24, 2025

Added quickstart instructions for creating a memory dump on Android devices.

Added quickstart instructions for creating a memory dump on Android devices.
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

This would be nice to add, except we revamped the process for .NET 10 to make it easier. I've been hassling the .NET diagnostics team, because the changes in dotnet-trace/dsrouter haven't released yet.

In the future you will do:

> dotnet-trace collect --dsrouter android
For finer control over the dotnet-dsrouter options, run it separately and connect to it using -p

WARNING: dotnet-dsrouter is a development tool not intended for production environments.

How to connect current dotnet-dsrouter pid=14684 with android device and diagnostics tooling.
Build and run your application on android device such as:
[Default Tracing]
dotnet build -t:Run -c Release -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=false -p:DiagnosticListenMode=connect
[Startup Tracing]
dotnet build -t:Run -c Release -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=true -p:DiagnosticListenMode=connect
See https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-dsrouter for additional details and examples.

Then use the example of building/running your app it prints above.

I also plan to finish this when everything is released:

@jonathanpeppers
Copy link
Member

Everything I mentioned about dotnet-trace above, also applies to dotnet-gcdump. Both tools have the same improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants