Some breakpoints don’t hit even though they should

I have a weird issue in a Tizen.NET + Xamarin Forms app. I just created a basic app using Visual Studio wizard. It created a Program class with OnCreate and Main method and MainPage.xaml and MainPage.xaml.cs. If I put a breakpoint lets say in the Program.Main and start the app it stops at that breakpoint but if I put a breakpoint anywhere within the MainPage class it says it cannot load symbols and does not stop there. Does anybody know what’s going on and how to enable debugging forms?

Update: Frankly speaking it was a little more than just a basic app and the issue become even weirder. If the MainPage class does not have any field declarations or have basic types field declarations such as int the breakpoints in the class work but if I add something like

  private Agent agent;
  private Peer peer;

breakpoints stop working.

Update: More observations. Apparently the issue is not as generic as I thought in the beginning. I assumed the issue happening for all kind of classes declared in the MainPage (XAML code behind). It turned out that the issue really happens only when I try to declare Agent or Peer Samsung.Sap NuGet package classes. If I create a custom class and declare it there the breakpoints are not affected.

Hello @kuc1597989013,

This seems like a very convoluted and rare issue. You can try to debug other Tizen projects to see if it occurs in your project only.

If it is a project-specific issue, it might occur due to issue/crashes elsewhere in your project before the debugger reaches your breakpoint.

If it is not a project-specific issue, your installation of Tizen tools might be corrupt and you should consider reinstalling them if the issue persists.

PS: If you think this answer solved your problem please mark the “like” button so that others can find it more easily.

Still trying to pinpoint the exact cause. At least it somehow works when I debug it on the real device, not the emulator but even in this case I have to run the whole blocks of code, if I go step by step it breaks and all that relates to Samsung.Sap.
I guess I had to mention that from the very beginning that I used emulator. However it doesn’t mean that everything is fine now. There is obviously a problem with integration of the emulator and VS debugger. My point is this really needs to be investigated by the Tizen.NET dev team.

I solved a similar problem by deleting my entire Tizen-data folder.