JaneySprings / DotNet.Meteor

A VSCode extension that can run and debug .NET apps (Xamarin, MAUI, Avalonia)
https://marketplace.visualstudio.com/items?itemName=nromanov.dotnet-meteor
MIT License
269 stars 10 forks source link

MAUI Profiler - dsrouter connection not getting established (macOS) #103

Closed kavitap081 closed 4 months ago

kavitap081 commented 4 months ago

Hi, I am running MAUI profiler using trace profileMode. I am able to launch the application on my device but then dsrouter is not able to create the connection between profiler and device. I am seeing "Router stopped" in my DEBUG CONSOLE window. From your troubleshooting documentation here, i tried updating port in .NET Meteor settings, but no use.

Here's my launch.json file image

Here's the screenshot of debug console messages : image

Can you please help to identify the issue and to move forward with profiling.

JaneySprings commented 4 months ago

Hi @kavitap081 ! Can you try to delete the bin, obj folders from your project?

kavitap081 commented 4 months ago

Hey @JaneySprings , I tried that, but still getting the same error. Could it be the issue as its running on macOS ? Also, i reset the port to 9000 again.

JaneySprings commented 4 months ago

Shutting down due to error: Address already in use It seems very strange. Are you sure changing your address doesn't help you? Maybe 11000

image

Also you can check the dotnet-dsrouter process in the Activity Monitor MacOS app. Just force close it and restart the profiling

image
kavitap081 commented 4 months ago

@JaneySprings If i change the port to say 11000. I am getting another error in Debug console. This is the error :

image

After this, I stopped debugging and again click on "Run without debugging" gave the same error : image

In these cases, app is not even getting installed on device

JaneySprings commented 4 months ago

@kavitap081 Can you send me your environment info, please? dotnet --version output dotnet workload list output Android device or emulator? And Android version

I will try to reproduce it

kavitap081 commented 4 months ago

@JaneySprings Sure. Here's the environemnt info dotnet --version is 8.0.301 and here's the dotnet workload list : wasi-experimental 8.0.6/8.0.100 SDK 8.0.300
maui 8.0.40/8.0.100 SDK 8.0.300

image

I am using Android device Samsung A53.

kavitap081 commented 4 months ago

Hi @JaneySprings ! Any update on it? Were you able to reproduce the issue ?

JaneySprings commented 4 months ago

Hi @kavitap081 ! Can you test it on the following versions? I built it for Mac (Apple + Intel versions)

DotNet.Meteor.v5.0.0_darwin-arm64.vsix.zip DotNet.Meteor.v5.0.0_darwin-x64.vsix.zip

Open VSCode, open the extensions tab and click install from vsix

image

Just make sure that you don't have any dotnet-dstouter processes running

kavitap081 commented 4 months ago

hey @JaneySprings , It worked with the vsix file you shared. Thanks , i am able to create .gcdump and .speedscope.json files.

JaneySprings commented 4 months ago

Yep, this error displays after the connection timeout. I changed the order of events (Microsoft documentation about profiling is incorrect).

I will create a fix for 4.7.0 and higher versions as soon as possible!

kavitap081 commented 4 months ago

Thanks a lot @JaneySprings for quick fix, Another thing which is not related to this extension, but can you let me know if there's a way to open .gcdump file in mac. I only see it can open in WindowsPerf and Visual studio ( of windows). I need that to check memory leaks from profiling data i collected using this extension.

Marking this issue as closed.

JaneySprings commented 4 months ago

Yes, check this open-source dotnet tool https://github.com/1hub/dotnet-heapview