Closed MichaelRumpler closed 1 week ago
@jonathanpeppers Is this us or is this a dotnet/runtime
thing?
@MichaelRumpler you might watch this, and see if you missed a step:
I think we could move this to the dotnet/diagnostics repo, but it doesn't seem like I have permission:
Thanks for the fast response! In the video I also didn't see
Waiting for connection on /tmp/maui-app
But I saw that you started the app in advance. I thought I should start it when dotnet-trace is already running. This will probably be the reason. I'll let you know (but don't have time today anymore).
Yes, that was the problem. The app needs to be started already (at least with nosuspend) when you run dotnet-trace.
Maybe you can switch the order of "Running dotnet-trace on the Host" and "Running the .NET for Android Application" and remove the "Waiting for connection on /tmp/maui-app" in Documentation/guides/tracing.md.
dotnet-trace now saves something, but speedscope cannot get useful data out of it. But thats a different problem.
I feel like ?!?
appears if dotnet-trace
wasn't shut down cleanly. Did you press enter to stop it?
Do all the other threads look the same?
I added the --duration
in my previous attempts because I wanted it to wait until the app was started. It seems like when it ended via duration, the trace was not complete.
I started the app in advance and removed that parameter and now the trace is complete. Thank you!
Here again what I did.
Window 1:
adb reverse tcp:9000 tcp:9001
dotnet-dsrouter android
Window 2:
adb shell setprop debug.mono.profile '127.0.0.1:9000,nosuspend,connect'
dotnet build -t:Run -c Release -p:AndroidEnableProfiler=true --no-restore
dotnet-trace ps
- look up pid of dsrouter and use it indotnet-trace collect -p 43512 --format speedscope
Do the tests in the app and press return in dotnet-trace to write the trace.
Android framework version
net8.0-android
Affected platform version
.NET 8.0.300
Description
I tried to follow https://github.com/dotnet/android/blob/main/Documentation/guides/tracing.md#running-dotnet-trace-on-the-host
I ran
adb reverse
anddotnet-dsrouter
without a problem, but when I trydotnet-trace
I get this output:The two providers are listed at once. The error comes after about a minute even though I set duration to 5 minutes. I don't see
One minute is not enough to run
dotnet build -t:Run -c Release -p:AndroidEnableProfiler=true --no-restore
in another window.I also tried setting
DOTNET_DiagnosticPorts
to some file in both windows, but then both commands are waiting for that file. How can I getdotnet-trace
and my Android app to sync?I installed all three dotnet global tools today. dotnet-trace has version 8.0.532401+d98406ff95be0a8398d4c403056c5705389665f3.
Steps to Reproduce
adb reverse tcp:9000 tcp:9001
dotnet-dsrouter android
adb shell setprop debug.mono.profile '127.0.0.1:9000,nosuspend,connect'
dotnet-trace ps
- look up pid of dsrouter and use it indotnet-trace collect -p 43512 --format speedscope --duration 00:00:05:00
Did you find any workaround?
No response
Relevant log output
No response