There are a few ways you can check variable values during a script. You'll need to either put a breakpoint in the script in a location after the variable value has been assigned, or pause the script after the variable value has been assigned.
Once the script stops, you can highlight the variable and either right click it and click ''Add to Watch'' or you can just hit CTRL-T to add it to the Watch list. You can then view the variable in the Watch tab (to get this tab in view, go to View>Debug>Watch).
You can also look at the Local Variables tab (to get this tab in view, go to View>Debug>Local Variables) to see what variables are currently in scope and what their values are, as well as their data type.
Another way would be to add msgbox code to your script to display variable values in a message box. I would recommend using the above 2 methods over the msgbox method.