-
Notifications
You must be signed in to change notification settings - Fork 161
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
Cannot hit breakpoints with Realm 4.2.0 in Xamarin.Android project #1910
Comments
Interesting... I wonder if the Fody 6 upgrade broke that. I'll need to play around with it and confirm that suspicion. |
same problem in Xamarin.iOS, breakpoints are not hit after upgrading to 4.2, going back to 4.1 solved the problem. |
I can also confirm this issue on my build on Android and iOS. Going back to Realm 4.1.0 solved the issue. Same on Visual Studio for Mac and Visual Studio 2019. No way to let beakpoint hit with Realm 4.2.0 |
i m having same problem too. i had to downgrade the realm version to 4.0.0 then it s working. |
Same problem for us, on both iOS and Android. Downgrading to 4.1.0 resolves the issue. Fody definitely seems to be the cause. In fact, folks that know far more about this than me suggested that Fody's use of an outdated Mono.Cecil could be the problem. |
I'm in trouble by this issue too. And I perhaps found a workaround of this problem. Add this to bottom of the elements of <Project ...>
<!-- blah blah blah -->
<!-- Add this -->
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DebugType>portable</DebugType>
<_DebugSymbolsProduced>true</_DebugSymbolsProduced>
</PropertyGroup>
</Project> Without attaching, stacktrace doesn't have source path and line number yet. But when I run Xamarin.Android app on debugger, breakpoints are hit and I could debug the code. |
I have just tried this workaround and it works. Breakpoints are hit in Xamarin.Android project. Edit: It also works with |
Downgrading to 4.1.0 solved the issue here. |
@nirinchev Might've found where this issue comes from, and it seems to be the I'd been wondering why breakpoints haven't been hitting for a while now, but finally figured out why. In short, Sources: |
Folks, could you please give these packages a go to see if they fix the issues for you? They're built off of #1927. |
I have just tried the Realm nuget package and it works! All the breakpoints were hit in debug mode. |
➤ Unito Sync Bot commented: Transition made by Unito |
When did you plan to release a fix for this issue existing more than three months? Not as @nagzso wrote, the issue seems to exist in normal Realm 4.2.0 package, too. But it only affects the Xamarin.Android project itself (Xamarin.iOS not tested). Debugger hits all breakpoints in netstandard2 projects using Realm 4.2.0 nuget package. |
There are prerelease packages linked earlier in the issue that address the problem. |
I think the biggest problem is that it makes the normal development process / debugging unusable. From my point of view, it makes sense to release a hotfix version (e.g. 4.2.1), even only with this fix. After that nobody will complain here. What do you think about this? |
@nirinchev Thanks, but we only use stable packages for our development, so pre-releases are not visible by default. Starting to mix stable and unstable packages is in my opinion not a good solution at all. I (and I think a lot of other developers as well) would be very grateful when releasing a hotfix as @krisztiankocsis mentioned. |
I agree, there's no legitimate reason to not release the hotfix. Just pointing out that if it's a major annoyance, you can temporarily use these packages. They are as stable as the hotfix will be. |
I would definitely consider not being able to use the debugger on a large project to be a major annoyance. |
Goals
Use Nuget package Realm 4.2.0 in a Xamarin.Android project
Expected Results
I can debug the project and hit breakpoints
Actual Results
The app is not debuggable / is not hitting breakpoints
Steps to Reproduce
The problem was introduced with Realm 4.2.0
Code Sample
Example project: RealmDebuggerProblem.zip
Likely important:
The "debugging information" dropdown in the project properties jumps back to "Embedded" even though "Portable" or "Full" were selected previously (and that value is still correct in the .csproj file):
Version of Realm and Tooling
Android Target version: Android 10 / Q
Xamarin.Android: 10.0.3
Vistual Studio 16.3.4
The text was updated successfully, but these errors were encountered: