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
- Intercepted Events text is hardly visible in Inspector window for UI elements when Editor theme is set to Light
- [Hierarchy V2] Add new Query Block window contains a typo in the Hierarchy Search Area block
- Scene is not rendered in Player when ran with -force-d3d12 argument and GPU Resident Drawer enabled
- “Failed to load” window appears when a package’s docked window is opened and the package is uninstalled
- Properties window is not closed when the GameObject is deleted and the Properties window is not focused
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.