Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin.Forms IOS Breakpoints Not Hit

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.

like image 692
Stephen Marcus Avatar asked May 17 '17 04:05

Stephen Marcus


2 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.

like image 168
j0ffe Avatar answered Nov 19 '22 19:11

j0ffe


An alternative solution is to disable linking in the iOS project (not PCL project). This worked for me.

  1. Go to iOS project settings
  2. iOS Build
  3. Linker Behavior: Don't Link.
like image 2
arni Avatar answered Nov 19 '22 20:11

arni