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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
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.