Xamarin.Forms IOS Breakpoints Not Hit

Viewed 5798

I recently upgraded to the new Xamarin for Visual Studio, and since then, I can no longer hit breakpoints during IOS debugging. Android works fine, strangely.

I uninstalled and reinstalled Visual Studio Community Edition 2017 and left all of the defaults intact. Previously, this has resolved odd issues like this one.

I have read dozens of similar complaints, but those solutions have not worked for me.

6 Answers

I had the same issue with Visual Studio 2017 on Windows and latest Xamarin using the iOS simulator on remote Mac. Debugging started, but breakpoints were not hit.

Got it working by changing nothing on the Mac or iOS Build options; instead changed the generated Debugging information type in Visual Studio 2017 in Windows from "Full" or "Pdb-only" to "Portable".

Debugging information setting in Visual Studio 2017 Project properties

I did this for the iOS Platform project as well as the shared Xamarin.Forms project (.NET Standard 2.0).

After this the breakpoints started getting hit in both the Shared project and the iOS platform project. Good times.

Go to your Visual Studio for Mac, Solution explorer and choose the project, Project->Option->Compiler->Debug information, choose “Full” in dropdown.

You need set this "Full" for EACH of those projects in the solution you want to debug otherwise the breakpoint will not kick in.

Xamarin forms: Make sure that your view is bound with the binding context otherwise breakpoints will not hit. And the breakpoints appear as symbols not loaded.

Example :

public ExamplePage()
    {
        InitializeComponent();
        BindingContext = App.Resolve<ExampleViewModel>();
    }

That resolved the issue for me:)

After doing lotsof digging finally got the solution, kindly look in the attached screen short.

In VS 2019 Community edition.

enter image description here

Related