You are still using sandbox on the code you provided.
Oh dear. That explains it all
You set breakpoints in code by clicking the left most area of the code window (it will have a slightly different color than the code window itself). This will place a red circle on that line of code. Then when you run your code in the IDE, when you get to that specific line where the breakpoint is, the program will pause and bring you to the code. From there you can mouse over variables to see their values, and you can step through your code line by line to see things process. This is way, way more valuable than just running the code over and over and guessing where the problem is. This will help you find the problem right away, because you can see the exact line of code where things don't turn out as you expect them to.
Thank you -- being able to view values line by line will be so much easier !!!