When creating a new Net Standard Xamarin Cross-Platform App then putting a breakpoint in shared code and starting the UWP app the debugger does not break on the breakpoint and VS says the breakpoint is not loaded. If you go to [UWP app] > bin > Debug > x86 > AppX there are no pdb files, which is why I assume the breakpoints don't get loaded.
Does anyone have a solution to this? Enabling .Net Native Toolchain fixes the issue, but makes compiling much slower. An issue was posted to the VS developer community, but it doesn't seem to be getting much attention...
developercommunity.visualstudio.com/content/problem/124393/uwp-breakpoints-ignored-when-net-native-toolchain.html
The workaround for this is to add the ...\bin\Debug\x86\ folder to the symbols manually (Tools > Options > Debugging > Symbols)
Answers
developercommunity.visualstudio.com/content/problem/124393/uwp-breakpoints-ignored-when-net-native-toolchain.html
developercommunity.visualstudio.com/content/problem/124393/uwp-breakpoints-ignored-when-net-native-toolchain.html
The workaround for this is to add the ...\bin\Debug\x86\ folder to the symbols manually (Tools > Options > Debugging > Symbols)
Thanks Jamesboy that worked for me.
I'm having what I think is the same problem. The proposed work around doesn't work for me. The UWP project of a Xamarin Forms solution will only break in the UWP project, but not in the Xamarin Forms base project code. Breakpoints show as unavailable. Any help appreciated.
@DavidGerding.4136 Xaml compilation is causing the problem. I've had this issue for years. Here is the fix: remove all
[XamlCompilation(XamlCompilationOptions.Compile)]
from your app. Then go to your App.xaml.cs and add this at the top before the namespace declaration (so you still get xaml compilation building for prod):...or you can surround all your xaml compilation statements I said to remove with the same if statements, either way.