locked
How can I debug the Xamarin.Forms.Platform.iOS Assembly? RRS feed

  • Question

  • User258271 posted

    Hi everyone,

    I usually debug XF using the method posted in this awesome blog by Jon Goldberger: https://devblogs.microsoft.com/xamarin/debugging-xamarin-forms/

    But but I can only step into Xamarin.Forms.Core, Xamarin.Forms.Platform and Xamarin.Forms.Xaml. For example, when I set a breakpoint in ObservableItemsSource.CollectionChanged, I have this call stack:

    and the cursor is at the place where I remove an item from a ObservableCollection, not at the place where I set the breakpoint:

    How can I load the symbols for Xamarin.Forms.Platform.iOS.dll so that I can step into the code there?

    Tuesday, November 17, 2020 4:46 PM

All replies

  • User382871 posted

    To debug the Xamarin.Forms.Platform.iOS Assembly, you could check the following tutorial which talks about stepping into and debugging the source code in Xamarin.iOS. https://devblogs.microsoft.com/xamarin/debugging-xamarin-ios/

    If you encounter problems while implementing this feature, you can post the problem in the following topics: https://forums.xamarin.com/discussion/124267/debugging-xamarin-open-source-frameworks-xamarin-forms https://forums.xamarin.com/discussion/124647/debugging-xamarin-open-source-frameworks-xamarin-ios

    Wednesday, November 18, 2020 5:51 AM
  • User258271 posted

    Hi Jarvan,

    thanks for your reply. I am not looking to debug Xamarin.iOS, though. The assembly is in the main Xamarin.Forms package, but its symbols are not loaded for some reason. Even Resharper complains when I try to automatically generate them with the decompiler. I also tried to set my Xamarin.iOS project and the NetStandard project to debug=Full, as suggested by this SO answer: https://stackoverflow.com/a/17940775/13005218

    Didn't work either....

    Wednesday, November 18, 2020 9:27 AM
  • User382871 posted

    According to the doc, it turns out that we do not have to do anything to step into the source code since VS 15.6, as it is included in the distributed Xamarin.iOS SDK. Try to enable the function: Tools -> Options -> Debugging -> General, enable .NET framework source stepping.

    Thursday, November 19, 2020 9:21 AM