Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2019.4
2019.4.16f1
2020.2
2021.1
2021.2
Issue ID
1305910
Regression
No
Exception object is null when there are multiple catch blocks with the same variable name while using Unity Debugger
Reproduction steps:
1. Open user's project "UnityDebuggerRepro.zip"
2. Open "SampleScene" Scene
3. Open a project (any project, can be empty) in Visual Studio and attach Unity Debugger of the opened project
4. Make sure "Common Language Runtime Exceptions" are all checked in "Exception Settings"
5. Enter Play Mode in Unity Editor
6. In Visual Studio, "Step Over" using F10 or button in the toolbar until you reach inside of "catch(SocketException ex)" block
7. Look at the "Autos" window to observe variables
Expected result: "ex" variable has a value of SocketException
Actual result: "ex" variable is null
Reproducible with: 2018.4.32f1, 2019.4.21f1, 2020.2.7f1, 2021.1.0b10, 2021.2.0a7
Note: Reproducible using both Mono and IL2CPP Scripting Backends
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Resolution Note (2021.1.X):
This appears to be a problem specific to the unity plugin for Visual Studio as the Rider debugger does not exhibit the same behavior. The bug has been passed along to them for further investigation.