ScratchData LogoScratchData
Back to tedmasterweb's profile

Debugger - Step Into Next

TEtedmasterweb•Created June 5, 2013
Debugger - Step Into Next
2
2
762 views
View on Scratch

Instructions

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!

Description

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.

Project Details

Project ID10644278
CreatedJune 5, 2013
Last ModifiedJune 5, 2013
SharedJune 5, 2013
Visibilityvisible
CommentsAllowed