Rider all errors are 'broken into' when debugging even with option off

Noticed this with all current 2021.2 beta versions… not sure if it’s a rider bug or an editor bug but it’s pretty annoying. Making it really hard to debug anything.

Bug report #1367206

1 Like

Also had this issue.

Worth mentioning also Rider version. And Scripting Backend in Unity (IL2Cpp or Mono)

I included a repro project with the bug report - but it was:
Unity 2021.2.0b12 (IL2CPP)
RD-212.5080.71
“com.unity.ide.rider”: “3.0.7”

I don’t have access to private bug reports in Unity issue tracker. Or I don’t know how to use it. Please share a link, if it public.

There is something that might match in the Rider issue tracker https://youtrack.jetbrains.com/issue/RIDER-61584
, it is about Player with IL2CPP backend. Are you debugging Player or Editor?

@van800 I’m debugging a IL2CPP editor - unlike that bug you linked I do have it muted. No breaking should happen at all ‘unhandled’ or otherwise.
I PMed you a link to the project / bug report. Let me know if you need anything else.

I have this issue as well on the same version of Unity and Rider

However I do not have this issue on this version of Rider in Unity 2020.3

1 Like

Ok, I can see the issue. You can workaround it for now by uncheckin “Brake on unhandled exceptions” in Rider settings.
But it is still an open question, why such exception in Unity is considered unhandled.

I have made a bug report https://youtrack.jetbrains.com/issue/RIDER-68197

1 Like

It looks like our QA team is processing the Unity bug report now. Once they complete that, we can have a look at it. @van800 : I’ll work with you to determine the proper behavior here and make sure we correct this.

3 Likes

Unity’s Mono reports the exceptions as unhandled because there are no try/catch blocks handling the exception, so technically, they are unhandled. Unity’s native code will prevent the application from crashing when these exceptions escape from managed code, but that’s completely hidden from the debugger, and probably also from Mono itself.

This is a change in behaviour in Unity 2021.2. The version of Mono being used before then would not report exceptions to the debugger.

To ignore these exceptions, you should uncheck “Break on unhandled exceptions” in Rider’s debugger options. Either that, or Unity needs to revert this change of behaviour.

Sounds like a feature, not a bug.