Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breakpoints not hit in shared .NET Standard 2.1 project #974

Closed
gaelian opened this issue Jul 15, 2022 · 2 comments
Closed

Breakpoints not hit in shared .NET Standard 2.1 project #974

gaelian opened this issue Jul 15, 2022 · 2 comments

Comments

@gaelian
Copy link

gaelian commented Jul 15, 2022

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.

@TimLariviere
Copy link
Member

TimLariviere commented Jul 18, 2022

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

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

@gaelian
Copy link
Author

gaelian commented Jul 19, 2022

Good to know there's a workaround I guess.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants