Skip to Main Content

Stepping Through a Project in VEXcode 123

The Project Stepping feature offers the user a way to see the execution of a project block by block. These visual cues can be used to help students troubleshoot, or to better understand a project’s flow. When a project is started, the 123 Robot will perform the project as instructed, but it may not be how the user intended. Having the ability to see the blocks being executed one at a time gives the user a better visual of which blocks may be causing the error, so debugging can become a more targeted and efficient process.


How to Use the Project Stepping Feature

selectstep.png

In order to use the Project Stepping feature in VEXcode 123, the 123 Robot must be connected to your tablet or computer. For information on connecting a 123 Robot, see the article for your device in the Install and Connect section of the VEX Library.

Select the Step button located at the top right of the VEXcode 123 toolbar.

forwardhighlight.png

Once selected, a green highlight will appear and flash around the {When started} block to indicate where the program is beginning, and then immediately moves to highlight the first block in the stack. The highlight will stay on the first block after {When started} until the Step button is selected again.

turnrighthighlight.png

Select the Step button again to start the block that is highlighted. The highlight will flash as the block is executed. Once the block is complete, the next block will become highlighted, indicating that it is ready to run the next command when the Step button is selected again.

Continue to use the Step button to execute the project one block at a time. When stepping through a project, selecting the Start button will cause the rest of the project to execute at full speed. This can be helpful if you want to step through the first few blocks of a project, but then carry out the rest of the project as it is written.


Debugging with the Project Stepping Feature

inthisexample.png

The Project Stepping feature slows down the flow of the project and provides direct visual feedback on what the 123 Robot is doing at each block in the project. This allows the user to go through the project one block at a time to observe behaviors and correct mistakes.

In this example, the intention is for the 123 Robot to drive in a square (drive forward for 1 step and turn right 90 degrees, 4 times to create a square). However, there is a wrong turn in the project.

examplehighlight.png

Use the Project Stepping feature to start and execute the project step by step until a mistake is observed.

Correct_mistake_together.png

Correct the mistake.

robotsquare.png

Then, select the Stop button and use the Step button to start the project again from the beginning, using the Project Stepping feature to observe the behavior of the 123 Robot in each block of the project. Repeat this process until the project works as intended.

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: