xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.48k stars 518 forks source link

Unable to debug MAUI application using VS Code for Mac on iPhone #21664

Closed iSukhi closed 1 day ago

iSukhi commented 2 days ago

I am using VS Code for Mac with the following specification.

Version: 1.95.3 (Universal) Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813 Date: 2024-11-13T14:50:04.152Z (6 days ago) Electron: 32.2.1 ElectronBuildId: 10427718 Chromium: 128.0.6613.186 Node.js: 20.18.0 V8: 12.8.374.38-electron.0 OS: Darwin arm64 24.1.0

The application gets installed on iPhone, but I am not able to debug the application on iPhone (No breakpoints are hitting) When I am deploying the application I am getting the following log:

/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.0/18.0.9617/tools/bin/mlaunch
error MT0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
System.NotSupportedException: Specified method is not supported.
at Xamarin.Hosting.DeviceCtlDevice.CreateTcpTunnel(LaunchConfig) in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting/DeviceCtlDevice.cs:line 79
at Xamarin.Launcher.DevController.CreateTcpTunnel(String, LaunchConfig) in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Launcher/controller-device.cs:line 844
at Xamarin.Launcher.Driver.MainAsync() in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Launcher/Main.cs:line 536
at Xamarin.Utils.NSRunLoopExtensions.RunUntilTaskCompletion[T](NSRunLoop, Task`1) in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Utils/Extensions.cs:line 30
at Xamarin.Launcher.Driver.Main2(String[]) in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Launcher/Main.cs:line 443
at Xamarin.Launcher.Driver.Main(String[]) in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Launcher/Main.cs:line 130
error MT0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
System.NotSupportedException: Specified method is not supported.
at Xamarin.Hosting.DeviceCtlDevice.CreateTcpTunnel(LaunchConfig) in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting/DeviceCtlDevice.cs:line 79
at Xamarin.Launcher.DevController.CreateTcpTunnel(String, LaunchConfig) in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Launcher/controller-device.cs:line 844
at Xamarin.Launcher.Driver.MainAsync() in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Launcher/Main.cs:line 536
at Xamarin.Utils.NSRunLoopExtensions.RunUntilTaskCompletion[T](NSRunLoop, Task`1) in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Utils/Extensions.cs:line 30
at Xamarin.Launcher.Driver.Main2(String[]) in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Launcher/Main.cs:line 443
at Xamarin.Launcher.Driver.Main(String[]) in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Launcher/Main.cs:line 130
rolfbjarne commented 2 days ago

Does it work if you use VS Code instead of VS Mac?

microsoft-github-policy-service[bot] commented 2 days ago

Hi @iSukhi. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

iSukhi commented 2 days ago

@rolfbjarne I am using VS Code only.

In VS for MAC I am not even able to build the code. I am getting the following issue:

Getting restore information for project *.csproj The operation failed due to an internal error: Could not load file or assembly 'System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.

vaibhav-sukhdeve commented 4 hours ago

@rolfbjarne If I may ask when this will take effect in VS code? Will it come as an update for IDE or MAUI workload?