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.49k stars 515 forks source link

Debugger not attaching Xcode 16 & .NET MAUI #21644

Closed jsabiometric closed 5 days ago

jsabiometric commented 1 week ago

Apple platform

iOS

Framework version

net9.0-*

Affected platform version

.NET 9.0.100

Description

When running on a physical device, the debugger is not attaching correctly and we can't see Console.WriteLine(...). Works fine on an iOS Simulator

The last line we see from the debug console is the following:

.../net9.0-ios/ios-arm64/BioSnap.app/Microsoft.Maui.Controls.HotReload.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

Versions

Xcode version: Version 16.1 (16B40)

Installed Workload Id      Manifest Version       Installation Source
---------------------------------------------------------------------
ios                        18.0.9617/9.0.100      SDK 9.0.100        
maui-tizen                 9.0.0/9.0.100          SDK 9.0.100        

Steps to Reproduce

  1. Create new MAUI project via Visual Studio Code
  2. Debugger not attaching on physical Startup Device.

Did you find any workaround?

Unfortunately not.

Relevant logs

No response

rolfbjarne commented 6 days ago

Do breakpoints work for you?

I can reproduce a problem with Console.WriteLine not showing up in VSCode, and a fix is coming for that, however the debugger works fine for me.

jsabiometric commented 5 days ago

Do breakpoints work for you?

I can reproduce a problem with Console.WriteLine not showing up in VSCode, and a fix is coming for that, however the debugger works fine for me.

Hey @rolfbjarne I can confirm the debugger is working and break-points are running. I can also confirm that Debug.WriteLine works, it's just Console.WriteLine that's broken. Would be very appreciated if you took a look at it, Thanks! Kind regards.

rolfbjarne commented 5 days ago

OK, great, I've fixed that part, it'll be included in a future service release (probably not the first one, since it's rather imminent and it's too late, but it should be in the next one, whenever that happens to be).

jsabiometric commented 5 days ago

@rolfbjarne Thank you very much, we'll try it out once it's released and confirm to you, Thanks again.