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
- Skinned Mesh Renderer with multiple Animator Components does not render when "Optimize Game Objects" is enabled
- [iOS]Certain characters are not displayed when using iOS devices with 18 OS and newer
- Trees do not render in 'Unity Terrain - URP Demo Scene'
- Silent crash when clicking in Scene View in a specific project
- The Player renders black on a Quest headset when MSAA, Post Processing, and Spacewarm depth submission are 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.