maui
maui copied to clipboard
Xcode Instruments Memory Allocations does not work with .NET MAUI projects on iOS
Description
Debbuging native memory allocations on iOS with Instruments doesn't work for MAUI projects
Steps to Reproduce
- Create an .Net MAUI application and deploy on an iOS emulator
- Try do debug Memory allocations with Instruments The application will run the tool will register a few seconds and then stop
- If you use a "pure" net8.0-ios project Instruments will not stop tracing the memory allocations
Link to public reproduction project repository
No response
Version with bug
8.0.6
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
This works for an Net8.0-ios application:
hi, same problem here. We want to use Instruments to trace memory allocations, that are not recorded by dotnet-gcdump or dotnet-trace. It was possible to use Instruments with Xamarin.Forms Apps, but with .Net 8-Maui it doesn't work anymore.
It would be nice to have some kind of feedback from the team not only adding labels
I see a similar behavior. If I do new Net-iOS project, the profiler records the whole session. If I try to run on our actual Net-iOS app, which uses Maui Essentials and shared project structure, it only attaches for 2-4 seconds before stopping. Running 8.0.203 of dotnet, Maui Essentials 8.0.6 and CommunityToolkit.Mvvm 8.2.2
Verified this issue with Visual Studio 17.6.12(Build410)and Xcode Instruments (15.1). Can repro this issue.