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
- Crash on ScriptableRenderLoopDraw when rendering a specific VFX in Play Mode
- The script is not renamed in the Project window when renaming and a compilation Error is present
- Average FPS in Play Mode degradation on a newly created BiRP project when it's upgraded from 2020.3.48f1 to a newer Editor version
- DecoratorDrawer indentation is incorrect when it is called with EditorGUI
- "Unable to get the list of approved APIs." is thrown when testing the App Packages with Windows App Certification Kit
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.