fabulous-dev / Fabulous

Declarative UI framework for cross-platform mobile & desktop apps, using MVU and F# functional programming

Home Page:https://fabulous.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Breakpoints not hit in shared .NET Standard 2.1 project

gaelian opened this issue · comments

Steps to reproduce:

  1. Install latest Fabulous project templates: dotnet new --install Fabulous.XamarinForms.Templates::2.0.5
  2. Create new Fabulous project: dotnet new fabulous-xf-vswin -n FabXamApp
  3. Set a breakpoint at line 18 in App.fs of the shared .NET Standard project
  4. Set a breakpoint at line 29 in the MainActivity.fs of the Android project
  5. Debug the Android project in simulator

As the app starts up, the breakpoint in MainActivity.fs will be hit as expected, allow the app to continue. Once the app has finished launching, clicking on "Increment" or "Decrement" buttons should result in the breakpoint on line 18 of App.fs being hit, but it is not hit.

Initially observed using Visual Studio for Windows (v17.2.6). But have also observed this same behaviour with Visual Studio for Mac.

Seems like an issue with Xamarin.Android that was supposed to be fixed, but isn't.
https://developercommunity.visualstudio.com/t/breakpoint-not-hit-debugging-xamarin-android-proje/1561025

xamarin/xamarin-android#6660 suggests turning on "Fast Deployment" fixes the problem.
I tried and it does indeed break when clicking Increment/Decrement.

Good to know there's a workaround I guess.

There sure does seem to be a lot of workarounds needed for Xamarin these days.