Stepping Through a Project in VEXcode GO

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 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.

Note: This article uses the Code Base configuration in VEXcode GO. See the Configuring a VEX GO Code Base VEX Library article for more information about how to configure a Code Base in VEXcode GO.


How to Use the Project Stepping Feature

VEXcode GO Toolbar with the Step icon highlighted in between the Start and Stop icons.

In order to use the Project Stepping feature in VEXcode GO, the Brain must be connected to your tablet or computer, and VEXcode GO should be configured for your build.

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

VEXcode GO Blocks project with a Drive for block, a Turn for block, and another Drive for block. The first Drive for block is highlighted in green to show that the program has stepped once and this block is now running.

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.

VEXcode GO Blocks project with a Drive for block, a Turn for block, and another Drive for block. The Turn for block is highlighted in green to show that the program has stepped twice and this block is now running.

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

VEXcode GO Blocks project with 4 pairs of Drive for and Turn for blocks that is meant to drive the robot in a square. An incorrect block is highlighted to indicate that there is a bug in the code.

The Project Stepping feature slows down the flow of the project and provides direct visual feedback on what the 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 behavior and correct mistakes.

In this example, the intention is for the Code Base to drive in a square (drive forward for 500 millimeters (mm) and turn right 90 degrees, 4 times to create a square). However, there is a wrong turn in the project.

VEXcode GO Blocks project with 4 pairs of Drive for and Turn for blocks that is meant to drive the robot in a square. An incorrect block is highlighted green to indicate that the program is currently stepping through the bug. A diagram to the right shows the robot taking an incorrect turn in its route.

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

VEXcode GO Blocks project showing the incorrect Drive in a square program. The incorrect Turn for block has its dropdown menu open and is highlighted. The direction value is changed from left to right. VEXcode GO Blocks project showing the fixed Drive in a square program. All 4 Turn for blocks now turn to the Right, and the block that has been fixed is highlighted.

Correct the mistake.

VEXcode GO Blocks project with 4 pairs of Drive for and Turn for blocks that will drive the robot in a square. The incorrect turn block has been fixed, and a diagram to the right shows the robot driving with the correct route.

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 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: