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
- Shader Graph Asset icon is not shown on creation unless you confirm the name
- APV Sky occlusion doesn't consider the terrain
- [iOS] "EXC_BAD_ACCESS" Player crash when Script Debugging is enabled
- Cursor skips input fields when tabbing between two sets of input fields
- "Shader error redefinition of 'Varyings'" error appears when selecting the shader
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.