Visual studio debugging [Unable to step. Array subscript out of range.]
I can't debug a program through Visual Studio 2015 without this error showing up instantly when I try to use any of the step buttons: [Unable to step. Array subscript out of range.]
The program has no errors or warnings in the unity console and works just fine when I run it.
This happens no matter what the program is doing at the time, and I can see no other feedback in the debugger. Can anyone help me figure out how to debug scripts correctly in VS?
Answer by brightonrichu · Mar 01, 2017 at 09:58 AM
@Trigonaut Hi,
There shouldn't be an issue with debugging scripts, as long as the Visual Studio integration has been properly installed. Can you try with a brand new project and a simple script (the auto-generated one will do) adding just a few instructions to step through? Check that works, which would first rule out anything specific to your project.
It still doesn't work, even on a new, simple script. I've reinstalled VS and the Unity plugins multiple times, though, exactly the same way as what worked previously.
@Trigonaut Which version of Unity are you using and have you installed the VS Unity plugin from the Unity installer or from within Visual Studio plugin manager? What happens when you use $$anonymous$$onodevelop?
I'm using the latest unity, 5.5.2, and VS 2015. I installed Unity Tools for VS through the unity installer. I haven't touched $$anonymous$$onodevelop at all.
This problem happens on all script files, no matter what code is there.
@Trigonaut I can't really see any reason for this not working. Couple of things. Do you have access to another machine you can try this on? What version of Unity are you actually using?
Unity 5.5.2, and it does indeed work on my other computer. I also just tried out $$anonymous$$onodevelop, and it can step through the code perfectly fine. If I can't fix VS I can just use $$anonymous$$ono.
Your answer
![](https://koobas.hobune.stream/wayback/20220612110334im_/https://answers.unity.com/themes/thub/images/avi.jpg)