0

I am in a powershell window on my PC and I am attempting to run 'dotnet-dsrouter android' in order to set up profiling of my app on my android device.

After hitting enter, I am seeing several errors as shown below. I do have the tool dotnet-dsrouter installed.

PS C:\Users\gmceaser> dotnet-dsrouter android
WARNING: dotnet-dsrouter is a development tool not intended for production environments.

How to connect current dotnet-dsrouter pid=8940 with android device and diagnostics tooling.
Start an application on android device with ONE of the following environment variables set:
[Default Tracing]
DOTNET_DiagnosticPorts=127.0.0.1:9000,nosuspend,connect
[Startup Tracing]
DOTNET_DiagnosticPorts=127.0.0.1:9000,suspend,connect
Run diagnotic tool connecting application on android device through dotnet-dsrouter pid=8940:
dotnet-trace collect -p 8940
See https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-dsrouter for additional details and examples.

info: dotnet-dsrouter-8940[0]
      Starting dotnet-dsrouter using pid=8940
fail: dotnet-dsrouter-8940[0]
      Failed executing adb reverse --list. Error: An error occurred trying to start process 'adb' with working directory 'C:\Users\gmceaser'. The system cannot find the file specified.
fail: dotnet-dsrouter-8940[0]
      Failed setting up adb port reverse. This might lead to problems communicating with Android application. Make sure env variable ANDROID_SDK_ROOT is set and points to an Android SDK. Executing with unknown adb status for port 9001.
info: dotnet-dsrouter-8940[0]
      Starting IPC server (dotnet-diagnostic-dsrouter-8940) <--> TCP server (127.0.0.1:9001) router.

I have done some research and seen that I might need to set the location of my Android_SDK_Root. So I ran the following command:

set ANDROID_SDK_ROOT=C:\Users\gmceaser\AppData\Local\Android\Sdk

then tried again and I am getting the same errors. Does anyone know why I am getting these errors?

1
  • If I follow the new documentation at github.com/dotnet/android/blob/main/Documentation/guides/… It seems better. Basically, I just run these two commands. $ adb reverse tcp:9000 tcp:9001 $ dotnet-trace collect --dsrouter android --format speedscope After this I am now getting the following error which seems to indicate the trace is not finding the running application. I am working on that. Commented May 10 at 13:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.