Can I keep track of certain variables when debugging?

When you use debug to stop at a breakpoint, only variables contained in the scope at that location appear in the variable table. Therefore, depending on the location of the breakpoint, the variable you want may not be visible.