Search Issue Tracker
Third Party Issue
Votes
3
Found in [Package]
2.0.2
Issue ID
VS-26
Regression
No
Editor strips required debug information from assembly, causing debugger to fail on const variables
How to reproduce:
1. Open user-submitted project (UnityVstuReport.zip)
2. Open the SampleScene
3. Open the NewBehaviourScript in Visual Studio script editor
4. Set a breakpoint at line 14
5. In Unity, enter Play Mode
6. In Visual Studio, highlight 'm_2DArray\[k_One, k_Two]', right-click it and select 'Add to watch'
Expected result: Visual Studio displays '0' as a value
Actual result: Visual Studio displays "The identifier k_One is not in the scope"
Reproducible with: 2018.4.26f1, 2019.4.8f1, 2020.1.3f1, 2020.2.0a20(VS Editor 1.0.9, 2.0.2)
Could not test with: 2019.4.8f1, 2020.1.3f1, 2020.2.0a20(VS Editor 1.0.4)
Notes:
Changing k_One and k_Two from 'const int' to 'int' does not cause this issue
Not reproducible with Rider
-
unity_130AE30C2B529E8EFB33
Jun 23, 2023 13:05
e só tbm acouteseu comigo eu n sei oq acouteseu com a unity q eu n consigo sele sona bloco editar script e tbm n cosigo personaliza augei podia ter tropesado nós fis ou algo deu errado na empresa eita unity
-
krenar_
Apr 13, 2022 14:11
still happening with Unity 2021 LTS
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
- GPU utilization increases by 20% on Meta Quest headsets when Render Graph is enabled on 6000.0.16f1 and higher
- Value on Slider (Int) control in UI Builder displays as default when saving UI Document
- Color mismatch in UI Builders Library panel when the Editors theme is set to Light Mode
- [Android ] "AndroidJNI.ToBooleanArray" returns a random non-zero value instead of "IntPtr.Zero" when the method argument is null
- Non-HDR color picker opens when selecting material color with HDR enabled
Resolution Note:
Our apologize for the late process of this issue. The issue has been identified by Microsoft teams and is being tracked at https://developercommunity.visualstudio.com/t/const-local-variables-are-not-working-wi/10449368.
We are closing this issue. If you encounter a problem, you can report the issue directly to Microsoft through Visual Studio. Thank you.