This is not a bug. As you can see in the error message the compiler tells you how to solve it.
This is a limitation related to a debugger optimization.
You cannot set the type here.
The way to solve it is by declaring the variable before the For loop:
Dim i as Int
For i = 0 To 10
Note that you don't need to always declare the variable before the for loop. In fact it is better not to.
This is only required when you first use a new variable in a for loop and later dim it.