Import this project into your own project and then add "broadcast 'Break' and wait" blocks wherever you want to explore variables. I also recommend setting the value of Message to (Backgound or Sprite Name) - > Control Trigger (When flag clicked, etc.) -> approximate position of break in current clode block. This facilitates tracking down where you are in the code execution. Be sure to display variables so that you can see them. You can disable the debugging feature by setting the global variable Debug to 0 (zero, or anything other than 1). This way you don't have to remove all of your debug code!
This is an example of how to simulate the "step into" functionality found in many debugging applications. Essentially, when you set a break point, you can step through a program line by line. Since Scratch doesn't offer much introspection, this is the closest we can come. You'll have to set your break points manually but when you do, you can then click the Next button to walk through them, examining the values of your variables along the way.